{"id":205889,"date":"2025-06-12T12:28:46","date_gmt":"2025-06-12T04:28:46","guid":{"rendered":"https:\/\/server.hk\/cnblog\/205889\/"},"modified":"2025-06-12T12:28:46","modified_gmt":"2025-06-12T04:28:46","slug":"golang-%e5%87%bd%e6%95%b0%e7%9a%84-goroutine-%e8%b0%83%e5%ba%a6%e4%b8%8e%e5%b9%b6%e5%8f%91","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/205889\/","title":{"rendered":"Golang \u51fd\u6570\u7684 Goroutine \u8c03\u5ea6\u4e0e\u5e76\u53d1"},"content":{"rendered":"<p>GOLANG\u4eca\u5929\u5c06\u7ed9\u5927\u5bb6\u5e26\u6765<br \/>\n<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\">\u300aGOLANG \u51fd\u6570\u7684 Goroutine \u8c03\u5ea6\u4e0e\u5e76\u53d1\u300b<\/span>\uff0c\u611f\u5174\u8da3\u7684\u670b\u53cb\u8bf7\u7ee7\u7eed\u770b\u4e0b\u53bb\u5427\uff01\u4ee5\u4e0b\u5185\u5bb9\u5c06\u4f1a\u6d89\u53ca\u5230<br \/>\n<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\"><\/span>\u7b49\u7b49\u77e5\u8bc6\u70b9\uff0c\u5982\u679c\u4f60\u662f\u6b63\u5728\u5b66\u4e60<br \/>\n<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\">GOLANG<\/span>\u6216\u8005\u5df2\u7ecf\u662f\u5927\u4f6c\u7ea7\u522b\u4e86\uff0c\u90fd\u975e\u5e38\u6b22\u8fce\u4e5f\u5e0c\u671b\u5927\u5bb6\u90fd\u80fd\u7ed9\u6211\u5efa\u8bae\u8bc4\u8bba\u54c8~\u5e0c\u671b\u80fd\u5e2e\u52a9\u5230\u5927\u5bb6\uff01,\u5728 GOLANG \u4e2d\uff0c\u4f7f\u7528 Goroutine \u5b9e\u73b0\u51fd\u6570\u7684\u5e76\u53d1\u6d89\u53ca\u4ee5\u4e0b\u6b65\u9aa4\uff1a\u521b\u5efa Goroutine\uff1a\u4f7f\u7528 go \u5173\u952e\u5b57\u6267\u884c\u51fd\u6570\u6216\u51fd\u6570\u8c03\u7528\uff0c\u4f8b\u5982\uff1ago func() { \/\/ goroutine \u4e2d\u7684\u4ee3\u7801 }()\u3002\u8c03\u5ea6\u7b56\u7565\uff1aGOLANG \u4f7f\u7528\u5408\u4f5c\u5f0f\u548c\u62a2\u5360\u5f0f\u8c03\u5ea6\u7b56\u7565\uff0c\u5141\u8bb8 Goroutine \u4ea4\u66ff\u6267\u884c\u3002\u5e76\u53d1\u51fd\u6570\uff1a\u521b\u5efa\u4e00\u4e2a\u5305\u542b\u591a\u4e2a Goroutine \u7684\u51fd\u6570\uff0c\u4f7f\u5176\u540c\u65f6\u6267\u884c\u3002\u7ed3\u679c\u6c47\u603b\uff1a\u4f7f\u7528\u901a\u9053\u6765\u63a5\u6536\u548c\u6c47\u603b Goroutine \u8fd4\u56de\u7684\u7ed3\u679c\u3002,<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20241027\/1730029786671e28da5892f.jpg\" class=\"aligncenter\">,<br \/>\n<strong>GOLANG \u51fd\u6570\u7684 Goroutine \u8c03\u5ea6\u4e0e\u5e76\u53d1<\/strong>,\u5728 GOLANG \u4e2d\uff0cGoroutine \u662f\u8f7b\u91cf\u7ea7\u7ebf\u7a0b\uff0c\u5141\u8bb8\u5728\u540c\u4e00\u5e94\u7528\u7a0b\u5e8f\u4e2d\u6267\u884c\u5e76\u53d1\u4efb\u52a1\u3002Goroutine \u7684\u8c03\u5ea6\u7531 runtime \u7ba1\u7406\uff0c\u672c\u6587\u5c06\u63a2\u8ba8\u5728\u51fd\u6570\u4e2d\u4f7f\u7528 Goroutine \u6267\u884c\u5e76\u53d1\u4efb\u52a1\u7684\u7b56\u7565\u3002,<br \/>\n<strong>Goroutine \u521b\u5efa<\/strong>,\u4f7f\u7528<br \/>\n<code>go<\/code> \u5173\u952e\u5b57\u53ef\u4ee5\u521b\u5efa Goroutine\uff0c\u8be5\u5173\u952e\u5b57\u540e\u8ddf\u4e00\u4e2a\u51fd\u6570\u5b57\u9762\u91cf\u6216\u51fd\u6570\u8c03\u7528\u3002\u4f8b\u5982\uff1a,<br \/>\n<strong>\u8c03\u5ea6\u7b56\u7565<\/strong>,GOLANG \u7684 runtime \u4f7f\u7528\u4ee5\u4e0b\u7b56\u7565\u8c03\u5ea6 Goroutine\uff1a,<br \/>\n<strong>\u5e76\u53d1\u51fd\u6570<\/strong>,\u8981\u521b\u5efa\u5e76\u53d1\u51fd\u6570\uff0c\u53ef\u4ee5\u5728\u51fd\u6570\u4e2d\u521b\u5efa\u591a\u4e2a Goroutine \u5e76\u8ba9\u5b83\u4eec\u540c\u65f6\u6267\u884c\u3002\u4f8b\u5982\uff1a,\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c<br \/>\n<code>doSomethingInParallel<\/code> \u51fd\u6570\u521b\u5efa\u4e86\u4e00\u4e2a Goroutine \u6c60\u6765\u540c\u65f6\u5904\u7406\u8bf7\u6c42\u3002\u7ed3\u679c\u901a\u8fc7\u4e00\u4e2a\u901a\u9053\u6c47\u603b\uff0c\u8be5\u901a\u9053\u5c06\u6bcf\u4e2a Goroutine \u4ea7\u751f\u7684\u7ed3\u679c\u53d1\u9001\u5230\u4e3b\u51fd\u6570\u3002,<br \/>\n<strong>\u5b9e\u6218\u6848\u4f8b<\/strong>,\u4ee5\u4e0b\u662f\u4e00\u4e2a\u4f7f\u7528\u51fd\u6570\u7ea7\u522b\u5e76\u53d1\u5904\u7406\u56fe\u50cf\u6587\u4ef6\u5927\u5c0f\u7684\u5b9e\u6218\u6848\u4f8b\uff1a,\u6b64\u51fd\u6570\u5728\u5355\u72ec\u7684 Goroutine \u4e2d\u5f02\u6b65\u8c03\u6574\u56fe\u50cf\u5927\u5c0f\uff0c\u5e76\u6253\u5370\u5df2\u8c03\u6574\u56fe\u50cf\u7684\u8def\u5f84\u3002\u5b83\u63d0\u9ad8\u4e86\u56fe\u50cf\u8c03\u6574\u7684\u6548\u7387\uff0c\u5c24\u5176\u662f\u5728\u56fe\u50cf\u6570\u91cf\u8f83\u591a\u6216\u56fe\u50cf\u6587\u4ef6\u8f83\u5927\u65f6\u3002,\u672c\u7bc7\u5173\u4e8e\u300aGOLANG \u51fd\u6570\u7684 Goroutine \u8c03\u5ea6\u4e0e\u5e76\u53d1\u300b\u7684\u4ecb\u7ecd\u5c31\u5230\u6b64\u7ed3\u675f\u5566\uff0c\u4f46\u662f\u5b66\u65e0\u6b62\u5883\uff0c\u60f3\u8981\u4e86\u89e3\u5b66\u4e60\u66f4\u591a\u5173\u4e8eGOLANG\u7684\u76f8\u5173\u77e5\u8bc6\uff0c\u8bf7\u5173\u6ce8GOLANG\u516c\u4f17\u53f7\uff01,<br \/>\n<strong>\u62a2\u5360\u5f0f\u8c03\u5ea6\uff1a<\/strong>\u5bf9\u4e8e\u67d0\u4e9b\u7c7b\u578b\u7684\u64cd\u4f5c\uff08\u5982\u7cfb\u7edf\u8c03\u7528\uff09\uff0cruntime \u4f1a\u5f3a\u5236\u62a2\u5360 Goroutine \u7684\u6267\u884c\u6743\uff0c\u4ee5\u786e\u4fdd\u7cfb\u7edf\u7684\u54cd\u5e94\u80fd\u529b\u3002,<br \/>\n<strong>\u5408\u4f5c\u5f0f\u8c03\u5ea6\uff1a<\/strong>Goroutine \u534f\u4f5c\u8ba9\u51fa\u6267\u884c\u6743\u7ed9\u5176\u4ed6 Goroutine\uff0c\u901a\u8fc7<br \/>\n<code>yield<\/code> \u51fd\u6570\u6216\u5728 I\/O \u64cd\u4f5c\u671f\u95f4\u8ba9\u51fa\u6267\u884c\u6743\u3002,GOLANG\u4eca\u5929\u5c06\u7ed9\u5927\u5bb6\u5e26\u6765<br \/>\n<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\">\u300aGOLANG \u51fd\u6570\u7684 Goroutine \u8c03\u5ea6\u4e0e\u5e76\u53d1\u300b<\/span>\uff0c\u611f\u5174\u8da3\u7684\u670b\u53cb\u8bf7\u7ee7\u7eed\u770b\u4e0b\u53bb\u5427\uff01\u4ee5\u4e0b\u5185\u5bb9\u5c06\u4f1a\u6d89\u53ca\u5230<br \/>\n<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\"><\/span>\u7b49\u7b49\u77e5\u8bc6\u70b9\uff0c\u5982\u679c\u4f60\u662f\u6b63\u5728\u5b66\u4e60<br \/>\n<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\">GOLANG<\/span>\u6216\u8005\u5df2\u7ecf\u662f\u5927\u4f6c\u7ea7\u522b\u4e86\uff0c\u90fd\u975e\u5e38\u6b22\u8fce\u4e5f\u5e0c\u671b\u5927\u5bb6\u90fd\u80fd\u7ed9\u6211\u5efa\u8bae\u8bc4\u8bba\u54c8~\u5e0c\u671b\u80fd\u5e2e\u52a9\u5230\u5927\u5bb6\uff01,<br \/>\n<b><\/b> <\/p>\n<p>\u5f53\u524d\u4f4d\u7f6e\uff1a <span>&gt;<\/span>  <span>&gt;<\/span>  <span>&gt;<\/span>  <span>&gt;<\/span> <span>GOLANG \u51fd\u6570\u7684 Goroutine \u8c03\u5ea6\u4e0e\u5e76\u53d1<\/span><\/p>\n<h1>GOLANG \u51fd\u6570\u7684 Goroutine \u8c03\u5ea6\u4e0e\u5e76\u53d1<\/h1>\n<p><span>2024-10-27 19:50:01<\/span><br \/>\n<span><i><\/i>0\u6d4f\u89c8<\/span><br \/>\n<span style=\"cursor: pointer\"><i><\/i>\u6536\u85cf<\/span> <\/p>\n<p>GOLANG\u4eca\u5929\u5c06\u7ed9\u5927\u5bb6\u5e26\u6765<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\">\u300aGOLANG \u51fd\u6570\u7684 Goroutine \u8c03\u5ea6\u4e0e\u5e76\u53d1\u300b<\/span>\uff0c\u611f\u5174\u8da3\u7684\u670b\u53cb\u8bf7\u7ee7\u7eed\u770b\u4e0b\u53bb\u5427\uff01\u4ee5\u4e0b\u5185\u5bb9\u5c06\u4f1a\u6d89\u53ca\u5230<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\"><\/span>\u7b49\u7b49\u77e5\u8bc6\u70b9\uff0c\u5982\u679c\u4f60\u662f\u6b63\u5728\u5b66\u4e60<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\">GOLANG<\/span>\u6216\u8005\u5df2\u7ecf\u662f\u5927\u4f6c\u7ea7\u522b\u4e86\uff0c\u90fd\u975e\u5e38\u6b22\u8fce\u4e5f\u5e0c\u671b\u5927\u5bb6\u90fd\u80fd\u7ed9\u6211\u5efa\u8bae\u8bc4\u8bba\u54c8~\u5e0c\u671b\u80fd\u5e2e\u52a9\u5230\u5927\u5bb6\uff01<\/p>\n<p>\u5728 GOLANG \u4e2d\uff0c\u4f7f\u7528 Goroutine \u5b9e\u73b0\u51fd\u6570\u7684\u5e76\u53d1\u6d89\u53ca\u4ee5\u4e0b\u6b65\u9aa4\uff1a\u521b\u5efa Goroutine\uff1a\u4f7f\u7528 go \u5173\u952e\u5b57\u6267\u884c\u51fd\u6570\u6216\u51fd\u6570\u8c03\u7528\uff0c\u4f8b\u5982\uff1ago func() { \/\/ goroutine \u4e2d\u7684\u4ee3\u7801 }()\u3002\u8c03\u5ea6\u7b56\u7565\uff1aGOLANG \u4f7f\u7528\u5408\u4f5c\u5f0f\u548c\u62a2\u5360\u5f0f\u8c03\u5ea6\u7b56\u7565\uff0c\u5141\u8bb8 Goroutine \u4ea4\u66ff\u6267\u884c\u3002\u5e76\u53d1\u51fd\u6570\uff1a\u521b\u5efa\u4e00\u4e2a\u5305\u542b\u591a\u4e2a Goroutine \u7684\u51fd\u6570\uff0c\u4f7f\u5176\u540c\u65f6\u6267\u884c\u3002\u7ed3\u679c\u6c47\u603b\uff1a\u4f7f\u7528\u901a\u9053\u6765\u63a5\u6536\u548c\u6c47\u603b Goroutine \u8fd4\u56de\u7684\u7ed3\u679c\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20241027\/1730029786671e28da5892f.jpg\" class=\"aligncenter\"><\/p>\n<p><strong>GOLANG \u51fd\u6570\u7684 Goroutine \u8c03\u5ea6\u4e0e\u5e76\u53d1<\/strong><\/p>\n<p>\u5728 GOLANG \u4e2d\uff0cGoroutine \u662f\u8f7b\u91cf\u7ea7\u7ebf\u7a0b\uff0c\u5141\u8bb8\u5728\u540c\u4e00\u5e94\u7528\u7a0b\u5e8f\u4e2d\u6267\u884c\u5e76\u53d1\u4efb\u52a1\u3002Goroutine \u7684\u8c03\u5ea6\u7531 runtime \u7ba1\u7406\uff0c\u672c\u6587\u5c06\u63a2\u8ba8\u5728\u51fd\u6570\u4e2d\u4f7f\u7528 Goroutine \u6267\u884c\u5e76\u53d1\u4efb\u52a1\u7684\u7b56\u7565\u3002<\/p>\n<p><strong>Goroutine \u521b\u5efa<\/strong><\/p>\n<p>\u4f7f\u7528 <code>go<\/code> \u5173\u952e\u5b57\u53ef\u4ee5\u521b\u5efa Goroutine\uff0c\u8be5\u5173\u952e\u5b57\u540e\u8ddf\u4e00\u4e2a\u51fd\u6570\u5b57\u9762\u91cf\u6216\u51fd\u6570\u8c03\u7528\u3002\u4f8b\u5982\uff1a<\/p>\n<pre>func main() {\n    go func() {\n        \/\/ goroutine \u4e2d\u6267\u884c\u7684\u4ee3\u7801\n    }()\n}<\/pre>\n<p><strong>\u8c03\u5ea6\u7b56\u7565<\/strong><\/p>\n<p>GOLANG \u7684 runtime \u4f7f\u7528\u4ee5\u4e0b\u7b56\u7565\u8c03\u5ea6 Goroutine\uff1a<\/p>\n<ul>\n<li><strong>\u5408\u4f5c\u5f0f\u8c03\u5ea6\uff1a<\/strong>Goroutine \u534f\u4f5c\u8ba9\u51fa\u6267\u884c\u6743\u7ed9\u5176\u4ed6 Goroutine\uff0c\u901a\u8fc7 <code>yield<\/code> \u51fd\u6570\u6216\u5728 I\/O \u64cd\u4f5c\u671f\u95f4\u8ba9\u51fa\u6267\u884c\u6743\u3002<\/li>\n<li><strong>\u62a2\u5360\u5f0f\u8c03\u5ea6\uff1a<\/strong>\u5bf9\u4e8e\u67d0\u4e9b\u7c7b\u578b\u7684\u64cd\u4f5c\uff08\u5982\u7cfb\u7edf\u8c03\u7528\uff09\uff0cruntime \u4f1a\u5f3a\u5236\u62a2\u5360 Goroutine \u7684\u6267\u884c\u6743\uff0c\u4ee5\u786e\u4fdd\u7cfb\u7edf\u7684\u54cd\u5e94\u80fd\u529b\u3002<\/li>\n<\/ul>\n<p><strong>\u5e76\u53d1\u51fd\u6570<\/strong><\/p>\n<p>\u8981\u521b\u5efa\u5e76\u53d1\u51fd\u6570\uff0c\u53ef\u4ee5\u5728\u51fd\u6570\u4e2d\u521b\u5efa\u591a\u4e2a Goroutine \u5e76\u8ba9\u5b83\u4eec\u540c\u65f6\u6267\u884c\u3002\u4f8b\u5982\uff1a<\/p>\n<pre>func doSomethingInParallel(requests []Request) {\n    resultCh := make(chan Result, len(requests))\n\n    \/\/ \u4e3a\u6bcf\u4e2a\u8bf7\u6c42\u521b\u5efa\u4e00\u4e2a Goroutine\n    for _, request := range requests {\n        go func(req Request) {\n            \/\/ \u5904\u7406\u8bf7\u6c42\u5e76\u5411\u7ed3\u679c\u901a\u9053\u53d1\u9001\u7ed3\u679c\n            result := doSomething(req)\n            resultCh &lt;- result\n        }(request)\n    }\n\n    \/\/ \u63a5\u6536\u5e76\u6c47\u603b\u7ed3\u679c\n    results := []Result{}\n    for i := 0; i &lt; len(requests); i++ {\n        results = append(results, &lt;-resultCh)\n    }\n}<\/pre>\n<p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c<code>doSomethingInParallel<\/code> \u51fd\u6570\u521b\u5efa\u4e86\u4e00\u4e2a Goroutine \u6c60\u6765\u540c\u65f6\u5904\u7406\u8bf7\u6c42\u3002\u7ed3\u679c\u901a\u8fc7\u4e00\u4e2a\u901a\u9053\u6c47\u603b\uff0c\u8be5\u901a\u9053\u5c06\u6bcf\u4e2a Goroutine \u4ea7\u751f\u7684\u7ed3\u679c\u53d1\u9001\u5230\u4e3b\u51fd\u6570\u3002<\/p>\n<p><strong>\u5b9e\u6218\u6848\u4f8b<\/strong><\/p>\n<p>\u4ee5\u4e0b\u662f\u4e00\u4e2a\u4f7f\u7528\u51fd\u6570\u7ea7\u522b\u5e76\u53d1\u5904\u7406\u56fe\u50cf\u6587\u4ef6\u5927\u5c0f\u7684\u5b9e\u6218\u6848\u4f8b\uff1a<\/p>\n<pre>func resizeImagesInParallel(imagePaths []string) {\n    resizedPathsCh := make(chan string, len(imagePaths))\n\n    \/\/ \u4e3a\u6bcf\u4e2a\u56fe\u50cf\u521b\u5efa Goroutine\n    for _, imagePath := range imagePaths {\n        go func(path string) {\n            \/\/ \u8c03\u6574\u56fe\u50cf\u5927\u5c0f\u5e76\u5c06\u8def\u5f84\u53d1\u9001\u5230\u7ed3\u679c\u901a\u9053\n            resizedPath := resizeImage(path)\n            resizedPathsCh &lt;- resizedPath\n        }(imagePath)\n    }\n\n    \/\/ \u63a5\u6536\u5e76\u6253\u5370\u5df2\u8c03\u6574\u56fe\u50cf\u7684\u5927\u5c0f\u8def\u5f84\n    for i := 0; i &lt; len(imagePaths); i++ {\n        fmt.Println(\"Resized:\", &lt;-resizedPathsCh)\n    }\n}<\/pre>\n<p>\u6b64\u51fd\u6570\u5728\u5355\u72ec\u7684 Goroutine \u4e2d\u5f02\u6b65\u8c03\u6574\u56fe\u50cf\u5927\u5c0f\uff0c\u5e76\u6253\u5370\u5df2\u8c03\u6574\u56fe\u50cf\u7684\u8def\u5f84\u3002\u5b83\u63d0\u9ad8\u4e86\u56fe\u50cf\u8c03\u6574\u7684\u6548\u7387\uff0c\u5c24\u5176\u662f\u5728\u56fe\u50cf\u6570\u91cf\u8f83\u591a\u6216\u56fe\u50cf\u6587\u4ef6\u8f83\u5927\u65f6\u3002<\/p>\n<p>\u672c\u7bc7\u5173\u4e8e\u300aGOLANG \u51fd\u6570\u7684 Goroutine \u8c03\u5ea6\u4e0e\u5e76\u53d1\u300b\u7684\u4ecb\u7ecd\u5c31\u5230\u6b64\u7ed3\u675f\u5566\uff0c\u4f46\u662f\u5b66\u65e0\u6b62\u5883\uff0c\u60f3\u8981\u4e86\u89e3\u5b66\u4e60\u66f4\u591a\u5173\u4e8eGOLANG\u7684\u76f8\u5173\u77e5\u8bc6\uff0c\u8bf7\u5173\u6ce8GOLANG\u516c\u4f17\u53f7\uff01<\/p>\n<dl>\n<dt>\n <\/dt>\n<dd>\n   YouCompleteMe \u5b89\u88c5\u65f6\u9047\u5230 install.py \u811a\u672c\u62a5\u9519\u600e\u4e48\u529e\uff1f\n <\/dd>\n<\/dl>\n<dl>\n<dt>\n <\/dt>\n<dd>\n   \u51fd\u6570\u4e2d\u8fd4\u56de generator \u65f6\u5982\u4f55\u63a7\u5236\u751f\u6210\u5668\u72b6\u6001\uff1f\n <\/dd>\n<\/dl>\n","protected":false},"excerpt":{"rendered":"<p>GOLANG\u4eca\u5929\u5c06\u7ed9\u5927\u5bb6\u5e26\u6765 \u300a&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4925],"tags":[],"class_list":["post-205889","post","type-post","status-publish","format-standard","hentry","category-4925"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/205889","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=205889"}],"version-history":[{"count":0,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/205889\/revisions"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=205889"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=205889"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=205889"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}