{"id":205731,"date":"2025-06-12T08:19:36","date_gmt":"2025-06-12T00:19:36","guid":{"rendered":"https:\/\/server.hk\/cnblog\/205731\/"},"modified":"2025-06-12T08:19:36","modified_gmt":"2025-06-12T00:19:36","slug":"golang-%e5%87%bd%e6%95%b0%ef%bc%9agoroutine-%e8%b0%83%e8%af%95%e7%9a%84%e6%9c%80%e4%bd%b3%e5%ae%9e%e8%b7%b5%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/205731\/","title":{"rendered":"Golang \u51fd\u6570\uff1agoroutine \u8c03\u8bd5\u7684\u6700\u4f73\u5b9e\u8df5\uff1f"},"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\uff1agoroutine \u8c03\u8bd5\u7684\u6700\u4f73\u5b9e\u8df5\uff1f\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,\u6700\u4f73\u5b9e\u8df5\uff1a\u4f7f\u7528\u8c03\u8bd5\u5668 (dlv)\uff1a \u4ea4\u4e92\u5f0f\u63a5\u53e3\uff0c\u7528\u4e8e\u68c0\u67e5\u53d8\u91cf\u3001\u8bbe\u7f6e\u65ad\u70b9\u548c\u9010\u884c\u6267\u884c\u4ee3\u7801\u3002\u6253\u5370 goroutine \u5806\u6808\uff1a \u5f53\u53d1\u751f\u9519\u8bef\u65f6\uff0c\u8bb0\u5f55\u5f53\u524d goroutine \u7684\u5806\u6808\u8ddf\u8e2a\u3002\u4f7f\u7528 logging\uff1a \u8bb0\u5f55 goroutine \u542f\u52a8\u3001\u5b8c\u6210\u6216\u9519\u8bef\u7b49\u4e8b\u4ef6\u3002\u4f7f\u7528\u5de5\u5177 (pprof\u3001trace)\uff1a \u751f\u6210\u672c\u5730\u5806\u5206\u6790\u548c\u53ef\u89c6\u5316\u6267\u884c\u6d41\u8ddf\u8e2a\u3002\u4f7f\u7528 sentry\uff1a \u9519\u8bef\u76d1\u63a7\u670d\u52a1\uff0c\u63d0\u4f9b\u5806\u6808\u8ddf\u8e2a\u548c goroutine \u6807\u8bc6\u7b26\u7b49\u8be6\u7ec6\u4fe1\u606f\u3002,<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20241026\/1729951845671cf865e52a6.jpg\" class=\"aligncenter\">,<br \/>\n<strong>Go \u51fd\u6570\uff1agoroutine \u8c03\u8bd5\u7684\u6700\u4f73\u5b9e\u8df5<\/strong>,\u5728 Go \u7a0b\u5e8f\u4e2d\uff0cgoroutine \u662f\u5e76\u53d1\u6267\u884c\u7684\u8f7b\u91cf\u7ea7\u7ebf\u7a0b\u3002\u5b83\u4eec\u975e\u5e38\u6709\u7528\uff0c\u4f46\u8c03\u8bd5\u8d77\u6765\u53ef\u80fd\u5f88\u68d8\u624b\u3002\u4ee5\u4e0b\u662f\u4f18\u5316 goroutine \u8c03\u8bd5\u7684\u4e00\u4e9b\u6700\u4f73\u5b9e\u8df5\uff1a,<br \/>\n<strong>\u4f7f\u7528\u8c03\u8bd5\u5668<\/strong>,\u4f7f\u7528\u6807\u51c6\u7684 Go \u8c03\u8bd5\u5668 (<br \/>\n<code>dlv<\/code>) \u662f\u4e00\u4e2a\u4e0d\u9519\u7684\u9009\u62e9\u3002\u5b83\u63d0\u4f9b\u4e86\u4e00\u4e2a\u4ea4\u4e92\u5f0f\u547d\u4ee4\u884c\u754c\u9762\uff0c\u7528\u4e8e\u68c0\u67e5\u53d8\u91cf\u3001\u8bbe\u7f6e\u65ad\u70b9\u548c\u9010\u884c\u6267\u884c\u4ee3\u7801\u3002\u4ee5\u4e0b\u662f\u5982\u4f55\u4f7f\u7528<br \/>\n<code>dlv<\/code> \u8c03\u8bd5 goroutine\uff1a,<br \/>\n<strong>\u6253\u5370 goroutine \u5806\u6808<\/strong>,\u5f53\u53d1\u751f panic \u6216 fatal error \u65f6\uff0cGo \u4f1a\u6253\u5370\u5f53\u524d goroutine \u7684\u5806\u6808\u8ddf\u8e2a\u3002\u8fd9\u5bf9\u4e8e\u4e86\u89e3 goroutine \u6267\u884c\u65f6\u51fa\u73b0\u95ee\u9898\u7684\u4e0a\u4e0b\u6587\u975e\u5e38\u6709\u7528\u3002,<br \/>\n<strong>\u4f7f\u7528 logging<\/strong>,logging \u662f\u8c03\u8bd5 goroutine \u7684\u53e6\u4e00\u79cd\u6709\u6548\u65b9\u6cd5\u3002\u5b83\u5141\u8bb8\u60a8\u8bb0\u5f55\u4e8b\u4ef6\uff0c\u4f8b\u5982 goroutine \u542f\u52a8\u3001\u5b8c\u6210\u6216 panic\u3002\u4ee5\u4e0b\u662f\u5982\u4f55\u4f7f\u7528<br \/>\n<code>log<\/code> \u5305\u6253\u5370\u65e5\u5fd7\uff1a,<br \/>\n<strong>\u4f7f\u7528\u5de5\u5177<\/strong>,\u6709\u8bb8\u591a\u5de5\u5177\u53ef\u4ee5\u5e2e\u52a9\u8c03\u8bd5 goroutine\u3002\u4f8b\u5982\uff0c<br \/>\n<code>pprof<\/code> \u53ef\u4ee5\u751f\u6210\u5806\u5206\u6790\uff0c\u8be5\u5206\u6790\u53ef\u4ee5\u663e\u793a\u6b63\u5728\u8fd0\u884c\u7684 goroutine \u7684\u6570\u91cf\u53ca\u5176\u5806\u6808\u8ddf\u8e2a\u3002<br \/>\n<code>trace<\/code> \u53ef\u4ee5\u751f\u6210\u53ef\u89c6\u5316\u6267\u884c\u6d41\u7684\u8ddf\u8e2a\u3002,<br \/>\n<strong>\u4f7f\u7528 sentry<\/strong>,Sentry \u662f\u4e00\u4e2a\u9519\u8bef\u76d1\u63a7\u670d\u52a1\uff0c\u5b83\u5141\u8bb8\u60a8\u6536\u96c6\u548c\u5206\u6790\u4ece\u751f\u4ea7\u73af\u5883\u62a5\u544a\u7684\u9519\u8bef\u3002\u5b83\u652f\u6301 goroutine \u8c03\u8bd5\uff0c\u5e76\u63d0\u4f9b\u4e30\u5bcc\u7684\u9519\u8bef\u8be6\u7ec6\u4fe1\u606f\uff0c\u4f8b\u5982\u5806\u6808\u8ddf\u8e2a\u548c goroutine \u6807\u8bc6\u7b26\u3002,<br \/>\n<strong>\u6700\u4f73\u5b9e\u8df5\u63d0\u793a<\/strong>,\u4eca\u5929\u5173\u4e8e\u300aGOLANG \u51fd\u6570\uff1agoroutine \u8c03\u8bd5\u7684\u6700\u4f73\u5b9e\u8df5\uff1f\u300b\u7684\u5185\u5bb9\u5c31\u4ecb\u7ecd\u5230\u8fd9\u91cc\u4e86\uff0c\u662f\u4e0d\u662f\u5b66\u8d77\u6765\u4e00\u76ee\u4e86\u7136\uff01\u60f3\u8981\u4e86\u89e3\u66f4\u591a\u5173\u4e8e\u8c03\u8bd5\u7684\u5185\u5bb9\u8bf7\u5173\u6ce8GOLANG\u516c\u4f17\u53f7\uff01,\u4e3a\u6bcf\u4e2a goroutine \u5206\u914d\u4e00\u4e2a\u552f\u4e00\u7684\u6807\u8bc6\u7b26\uff0c\u4ee5\u8f7b\u677e\u8ddf\u8e2a\u9519\u8bef\u3002,\u4f7f\u7528\u534f\u7a0b\u6c60\u6765\u9650\u5236\u5e76\u53d1 goroutine \u7684\u6570\u91cf\u3002,\u4f7f\u7528<br \/>\n<code>recover<\/code> \u51fd\u6570\u4ece panic \u4e2d\u6062\u590d\u5e76\u8bb0\u5f55\u9519\u8bef\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\uff1agoroutine \u8c03\u8bd5\u7684\u6700\u4f73\u5b9e\u8df5\uff1f\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\uff1agoroutine \u8c03\u8bd5\u7684\u6700\u4f73\u5b9e\u8df5\uff1f<\/span><\/p>\n<h1>GOLANG \u51fd\u6570\uff1agoroutine \u8c03\u8bd5\u7684\u6700\u4f73\u5b9e\u8df5\uff1f<\/h1>\n<p><span>2024-10-26 22:11: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\uff1agoroutine \u8c03\u8bd5\u7684\u6700\u4f73\u5b9e\u8df5\uff1f\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>\u6700\u4f73\u5b9e\u8df5\uff1a\u4f7f\u7528\u8c03\u8bd5\u5668 (dlv)\uff1a \u4ea4\u4e92\u5f0f\u63a5\u53e3\uff0c\u7528\u4e8e\u68c0\u67e5\u53d8\u91cf\u3001\u8bbe\u7f6e\u65ad\u70b9\u548c\u9010\u884c\u6267\u884c\u4ee3\u7801\u3002\u6253\u5370 goroutine \u5806\u6808\uff1a \u5f53\u53d1\u751f\u9519\u8bef\u65f6\uff0c\u8bb0\u5f55\u5f53\u524d goroutine \u7684\u5806\u6808\u8ddf\u8e2a\u3002\u4f7f\u7528 logging\uff1a \u8bb0\u5f55 goroutine \u542f\u52a8\u3001\u5b8c\u6210\u6216\u9519\u8bef\u7b49\u4e8b\u4ef6\u3002\u4f7f\u7528\u5de5\u5177 (pprof\u3001trace)\uff1a \u751f\u6210\u672c\u5730\u5806\u5206\u6790\u548c\u53ef\u89c6\u5316\u6267\u884c\u6d41\u8ddf\u8e2a\u3002\u4f7f\u7528 sentry\uff1a \u9519\u8bef\u76d1\u63a7\u670d\u52a1\uff0c\u63d0\u4f9b\u5806\u6808\u8ddf\u8e2a\u548c goroutine \u6807\u8bc6\u7b26\u7b49\u8be6\u7ec6\u4fe1\u606f\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20241026\/1729951845671cf865e52a6.jpg\" class=\"aligncenter\"><\/p>\n<p><strong>Go \u51fd\u6570\uff1agoroutine \u8c03\u8bd5\u7684\u6700\u4f73\u5b9e\u8df5<\/strong><\/p>\n<p>\u5728 Go \u7a0b\u5e8f\u4e2d\uff0cgoroutine \u662f\u5e76\u53d1\u6267\u884c\u7684\u8f7b\u91cf\u7ea7\u7ebf\u7a0b\u3002\u5b83\u4eec\u975e\u5e38\u6709\u7528\uff0c\u4f46\u8c03\u8bd5\u8d77\u6765\u53ef\u80fd\u5f88\u68d8\u624b\u3002\u4ee5\u4e0b\u662f\u4f18\u5316 goroutine \u8c03\u8bd5\u7684\u4e00\u4e9b\u6700\u4f73\u5b9e\u8df5\uff1a<\/p>\n<p><strong>\u4f7f\u7528\u8c03\u8bd5\u5668<\/strong><\/p>\n<p>\u4f7f\u7528\u6807\u51c6\u7684 Go \u8c03\u8bd5\u5668 (<code>dlv<\/code>) \u662f\u4e00\u4e2a\u4e0d\u9519\u7684\u9009\u62e9\u3002\u5b83\u63d0\u4f9b\u4e86\u4e00\u4e2a\u4ea4\u4e92\u5f0f\u547d\u4ee4\u884c\u754c\u9762\uff0c\u7528\u4e8e\u68c0\u67e5\u53d8\u91cf\u3001\u8bbe\u7f6e\u65ad\u70b9\u548c\u9010\u884c\u6267\u884c\u4ee3\u7801\u3002\u4ee5\u4e0b\u662f\u5982\u4f55\u4f7f\u7528 <code>dlv<\/code> \u8c03\u8bd5 goroutine\uff1a<\/p>\n<pre>go run -gcflags=-N -l your_program.go\ndlv debug your_program.go\n(dlv) break main.f\n(dlv) c<\/pre>\n<p><strong>\u6253\u5370 goroutine \u5806\u6808<\/strong><\/p>\n<p>\u5f53\u53d1\u751f panic \u6216 fatal error \u65f6\uff0cGo \u4f1a\u6253\u5370\u5f53\u524d goroutine \u7684\u5806\u6808\u8ddf\u8e2a\u3002\u8fd9\u5bf9\u4e8e\u4e86\u89e3 goroutine \u6267\u884c\u65f6\u51fa\u73b0\u95ee\u9898\u7684\u4e0a\u4e0b\u6587\u975e\u5e38\u6709\u7528\u3002<\/p>\n<p><strong>\u4f7f\u7528 logging<\/strong><\/p>\n<p>logging \u662f\u8c03\u8bd5 goroutine \u7684\u53e6\u4e00\u79cd\u6709\u6548\u65b9\u6cd5\u3002\u5b83\u5141\u8bb8\u60a8\u8bb0\u5f55\u4e8b\u4ef6\uff0c\u4f8b\u5982 goroutine \u542f\u52a8\u3001\u5b8c\u6210\u6216 panic\u3002\u4ee5\u4e0b\u662f\u5982\u4f55\u4f7f\u7528 <code>log<\/code> \u5305\u6253\u5370\u65e5\u5fd7\uff1a<\/p>\n<pre>package main\n\nimport (\n    \"log\"\n)\n\nfunc main() {\n    \/\/ \u8bb0\u5f55 goroutine \u542f\u52a8\n    log.Println(\"Goroutine started\")\n\n    \/\/ \u8bb0\u5f55 goroutine \u5b8c\u6210\n    defer log.Println(\"Goroutine completed\")\n\n    \/\/ \u5f15\u53d1 panic\n    panic(\"panic occurred\")\n}<\/pre>\n<p><strong>\u4f7f\u7528\u5de5\u5177<\/strong><\/p>\n<p>\u6709\u8bb8\u591a\u5de5\u5177\u53ef\u4ee5\u5e2e\u52a9\u8c03\u8bd5 goroutine\u3002\u4f8b\u5982\uff0c<code>pprof<\/code> \u53ef\u4ee5\u751f\u6210\u5806\u5206\u6790\uff0c\u8be5\u5206\u6790\u53ef\u4ee5\u663e\u793a\u6b63\u5728\u8fd0\u884c\u7684 goroutine \u7684\u6570\u91cf\u53ca\u5176\u5806\u6808\u8ddf\u8e2a\u3002<code>trace<\/code> \u53ef\u4ee5\u751f\u6210\u53ef\u89c6\u5316\u6267\u884c\u6d41\u7684\u8ddf\u8e2a\u3002<\/p>\n<p><strong>\u4f7f\u7528 sentry<\/strong><\/p>\n<p>Sentry \u662f\u4e00\u4e2a\u9519\u8bef\u76d1\u63a7\u670d\u52a1\uff0c\u5b83\u5141\u8bb8\u60a8\u6536\u96c6\u548c\u5206\u6790\u4ece\u751f\u4ea7\u73af\u5883\u62a5\u544a\u7684\u9519\u8bef\u3002\u5b83\u652f\u6301 goroutine \u8c03\u8bd5\uff0c\u5e76\u63d0\u4f9b\u4e30\u5bcc\u7684\u9519\u8bef\u8be6\u7ec6\u4fe1\u606f\uff0c\u4f8b\u5982\u5806\u6808\u8ddf\u8e2a\u548c goroutine \u6807\u8bc6\u7b26\u3002<\/p>\n<p><strong>\u6700\u4f73\u5b9e\u8df5\u63d0\u793a<\/strong><\/p>\n<ul>\n<li>\u4f7f\u7528\u534f\u7a0b\u6c60\u6765\u9650\u5236\u5e76\u53d1 goroutine \u7684\u6570\u91cf\u3002<\/li>\n<li>\u4e3a\u6bcf\u4e2a goroutine \u5206\u914d\u4e00\u4e2a\u552f\u4e00\u7684\u6807\u8bc6\u7b26\uff0c\u4ee5\u8f7b\u677e\u8ddf\u8e2a\u9519\u8bef\u3002<\/li>\n<li>\u4f7f\u7528 <code>recover<\/code> \u51fd\u6570\u4ece panic \u4e2d\u6062\u590d\u5e76\u8bb0\u5f55\u9519\u8bef\u3002<\/li>\n<li>\u5728\u751f\u4ea7\u73af\u5883\u4e2d\u542f\u7528\u9519\u8bef\u76d1\u63a7\u3002<\/li>\n<li>\u5b9a\u671f\u8fdb\u884c\u5355\u5143\u6d4b\u8bd5\u548c\u96c6\u6210\u6d4b\u8bd5\u4ee5\u6355\u83b7\u6f5c\u5728\u95ee\u9898\u3002<\/li>\n<\/ul>\n<p>\u4eca\u5929\u5173\u4e8e\u300aGOLANG \u51fd\u6570\uff1agoroutine \u8c03\u8bd5\u7684\u6700\u4f73\u5b9e\u8df5\uff1f\u300b\u7684\u5185\u5bb9\u5c31\u4ecb\u7ecd\u5230\u8fd9\u91cc\u4e86\uff0c\u662f\u4e0d\u662f\u5b66\u8d77\u6765\u4e00\u76ee\u4e86\u7136\uff01\u60f3\u8981\u4e86\u89e3\u66f4\u591a\u5173\u4e8e\u8c03\u8bd5\u7684\u5185\u5bb9\u8bf7\u5173\u6ce8GOLANG\u516c\u4f17\u53f7\uff01<\/p>\n<dl>\n<dt>\n <\/dt>\n<dd>\n   \u901a\u8fc7\u51fd\u6570\u53c2\u6570\u5316\u5b9e\u73b0 Java \u51fd\u6570\u7684\u53ef\u91cd\u7528\u6027\n <\/dd>\n<\/dl>\n<dl>\n<dt>\n <\/dt>\n<dd>\n   Spring Boot \u6ce8\u89e3\u89e3\u91ca\uff1a\u60a8\u5e94\u8be5\u4e86\u89e3\u7684\u57fa\u672c\u6ce8\u89e3\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-205731","post","type-post","status-publish","format-standard","hentry","category-4925"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/205731","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=205731"}],"version-history":[{"count":0,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/205731\/revisions"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=205731"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=205731"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=205731"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}