{"id":205905,"date":"2025-06-12T08:28:42","date_gmt":"2025-06-12T00:28:42","guid":{"rendered":"https:\/\/server.hk\/cnblog\/205905\/"},"modified":"2025-06-12T08:28:42","modified_gmt":"2025-06-12T00:28:42","slug":"go-%e5%8d%8f%e7%a8%8b%e4%bc%98%e5%8c%96%e6%8c%87%e5%8d%97%ef%bc%9a%e6%a6%a8%e5%8f%96%e6%af%8f%e4%b8%80%e6%bb%b4%e6%80%a7%e8%83%bd","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/205905\/","title":{"rendered":"Go \u534f\u7a0b\u4f18\u5316\u6307\u5357\uff1a\u69a8\u53d6\u6bcf\u4e00\u6ef4\u6027\u80fd"},"content":{"rendered":"<p>\u54c8\u55bd\uff01\u5927\u5bb6\u597d\uff0c\u5f88\u9ad8\u5174\u53c8\u89c1\u9762\u4e86\uff0c\u6211\u662fGOLANG\u7684\u4e00\u540d\u4f5c\u8005\uff0c\u4eca\u5929\u7531\u6211\u7ed9\u5927\u5bb6\u5e26\u6765\u4e00\u7bc7<br \/>\n<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\">\u300aGo \u534f\u7a0b\u4f18\u5316\u6307\u5357\uff1a\u69a8\u53d6\u6bcf\u4e00\u6ef4\u6027\u80fd\u300b<\/span>\uff0c\u672c\u6587\u4e3b\u8981\u4f1a\u8bb2\u5230<br \/>\n<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\"><\/span>\u7b49\u7b49\u77e5\u8bc6\u70b9\uff0c\u5e0c\u671b\u5927\u5bb6\u4e00\u8d77\u5b66\u4e60\u8fdb\u6b65\uff0c\u4e5f\u6b22\u8fce\u5927\u5bb6\u5173\u6ce8\u3001\u70b9\u8d5e\u3001\u6536\u85cf\u3001\u8f6c\u53d1! \u4e0b\u9762\u5c31\u4e00\u8d77\u6765\u770b\u770b\u5427\uff01,\u5982\u4f55\u4f18\u5316 Go \u534f\u7a0b\u6027\u80fd\uff1a\u9650\u5236\u5e76\u53d1\u5ea6\uff0c\u4ee5\u907f\u514d\u8fc7\u591a\u7684\u4e0a\u4e0b\u6587\u5207\u6362\u5f00\u9500\u3002\u4f7f\u7528\u534f\u7a0b\u6c60\uff0c\u4ee5\u91cd\u7528\u9884\u5148\u521b\u5efa\u7684\u534f\u7a0b\uff0c\u6d88\u9664\u521b\u5efa\u548c\u9500\u6bc1\u5f00\u9500\u3002\u786e\u4fdd\u5e76\u53d1\u5b89\u5168\uff0c\u9632\u6b62\u534f\u7a0b\u540c\u65f6\u8bbf\u95ee\u5171\u4eab\u6570\u636e\u3002\u907f\u514d\u963b\u585e\u64cd\u4f5c\uff0c\u4ee5\u4fdd\u6301\u5e76\u53d1\u6027\u3002\u8c03\u4f18 GOMAXPROCS \u73af\u5883\u53d8\u91cf\uff0c\u4ee5\u4f18\u5316 CPU \u5185\u6838\u4f7f\u7528\u3002,<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20241027\/1730037219671e45e3f0b77.jpg\" class=\"aligncenter\">,<br \/>\n<strong>Go \u534f\u7a0b\u4f18\u5316\u6307\u5357\uff1a\u69a8\u53d6\u6bcf\u4e00\u6ef4\u6027\u80fd<\/strong>,<br \/>\n<strong>\u7b80\u4ecb<\/strong>,\u534f\u7a0b\u662f Go \u8bed\u8a00\u4e2d\u4e00\u79cd\u8f7b\u91cf\u7ea7\u7ebf\u7a0b\uff0c\u53ef\u5e2e\u52a9\u5e76\u884c\u6267\u884c\u5927\u91cf\u4efb\u52a1\u3002\u901a\u8fc7\u4f18\u5316\u534f\u7a0b\uff0c\u6211\u4eec\u53ef\u4ee5\u663e\u8457\u63d0\u9ad8\u5e94\u7528\u7a0b\u5e8f\u7684\u6027\u80fd\u3002\u672c\u6307\u5357\u5c06\u4ecb\u7ecd\u51e0\u79cd\u63d0\u9ad8\u534f\u7a0b\u6027\u80fd\u7684\u6709\u6548\u6280\u672f\u3002,<br \/>\n<strong>1. \u9650\u5236\u5e76\u53d1\u5ea6<\/strong>,\u5f53\u5e76\u53d1\u534f\u7a0b\u8fc7\u591a\u65f6\uff0c\u4f1a\u5bfc\u81f4\u4e0a\u4e0b\u6587\u5207\u6362\u5f00\u9500\u589e\u52a0\u3002\u4e3a\u4e86\u907f\u514d\u8fd9\u79cd\u60c5\u51b5\uff0c\u6211\u4eec\u9700\u8981\u9650\u5236\u5e94\u7528\u7a0b\u5e8f\u4e2d\u540c\u65f6\u8fd0\u884c\u7684\u534f\u7a0b\u6570\u91cf\u3002\u53ef\u4ee5\u4f7f\u7528<br \/>\n<code>Semaphore<\/code> \u6216<br \/>\n<code>sync.WaitGroup<\/code> \u7b49\u5e76\u53d1\u63a7\u5236\u673a\u5236\u6765\u5b9e\u73b0\u8fd9\u4e00\u70b9\u3002,<br \/>\n<strong>2. \u5229\u7528 Goroutine \u6c60<\/strong>,\u9891\u7e41\u521b\u5efa\u548c\u9500\u6bc1\u534f\u7a0b\u4e5f\u662f\u6027\u80fd\u4f4e\u4e0b\u7684\u6839\u6e90\u3002\u4e3a\u4e86\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u534f\u7a0b\u6c60\uff0c\u5b83\u9884\u5148\u521b\u5efa\u534f\u7a0b\u5e76\u6839\u636e\u9700\u8981\u91cd\u7528\u5b83\u4eec\u3002\u8fd9\u6d88\u9664\u4e86\u521b\u5efa\u548c\u9500\u6bc1\u534f\u7a0b\u7684\u5f00\u9500\u3002,<br \/>\n<strong>\u4ee3\u7801\u793a\u4f8b\uff1a<\/strong>,<br \/>\n<strong>3. \u5e76\u53d1\u5b89\u5168<\/strong>,\u5728\u5e76\u53d1\u73af\u5883\u4e2d\uff0c\u534f\u7a0b\u53ef\u80fd\u4f1a\u540c\u65f6\u8bbf\u95ee\u5171\u4eab\u6570\u636e\uff0c\u56e0\u6b64\u786e\u4fdd\u5e76\u53d1\u5b89\u5168\u81f3\u5173\u91cd\u8981\u3002\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528\u8bf8\u5982<br \/>\n<code>sync.Mutex<\/code> \u6216<br \/>\n<code>sync.RWMutex<\/code> \u7b49\u9501\u6765\u5b9e\u73b0\u6b64\u76ee\u7684\u3002,<br \/>\n<strong>4. \u907f\u514d\u963b\u585e\u64cd\u4f5c<\/strong>,\u963b\u585e\u64cd\u4f5c\u4f1a\u963b\u6b62\u534f\u7a0b\u6267\u884c\uff0c\u4ece\u800c\u9650\u5236\u5e76\u53d1\u6027\u3002\u5e94\u59cb\u7ec8\u5c06\u963b\u585e\u64cd\u4f5c\u79fb\u5230\u5355\u72ec\u7684\u534f\u7a0b\u4e2d\u6216\u4f7f\u7528\u975e\u963b\u585e\u66ff\u4ee3\u65b9\u6848\u3002,<br \/>\n<strong>5. \u8c03\u4f18 GOMAXPROCS<\/strong>,<br \/>\n<code>GOMAXPROCS<\/code> \u73af\u5883\u53d8\u91cf\u63a7\u5236\u53ef\u540c\u65f6\u8fd0\u884c\u7684 CPU \u5185\u6838\u6570\u91cf\u3002\u6839\u636e\u7cfb\u7edf\u7684 CPU \u5185\u6838\u6570\u91cf\u548c\u5e94\u7528\u7a0b\u5e8f\u7684\u7279\u6027\u8fdb\u884c\u8c03\u6574\u53ef\u4ee5\u63d0\u9ad8\u6027\u80fd\u3002,<br \/>\n<strong>\u5b9e\u6218\u6848\u4f8b\uff1a\u7f51\u7edc\u670d\u52a1<\/strong>,\u5728\u7f51\u7edc\u670d\u52a1\u4e2d\uff0c\u534f\u7a0b\u53ef\u7528\u4e8e\u5e76\u884c\u5904\u7406\u4f20\u5165\u8bf7\u6c42\u3002\u901a\u8fc7\u9650\u5236\u5e76\u53d1\u5ea6\u3001\u4f7f\u7528\u534f\u7a0b\u6c60\u548c\u907f\u514d\u963b\u585e\u64cd\u4f5c\uff0c\u6211\u4eec\u53ef\u4ee5\u663e\u8457\u63d0\u9ad8\u670d\u52a1\u7684\u54cd\u5e94\u80fd\u529b\u548c\u541e\u5410\u91cf\u3002,<br \/>\n<strong>\u7ed3\u8bba<\/strong>,\u4f18\u5316\u534f\u7a0b\u662f\u63d0\u9ad8 Go \u5e94\u7528\u7a0b\u5e8f\u6027\u80fd\u7684\u91cd\u8981\u4e00\u6b65\u3002\u901a\u8fc7\u9075\u5faa\u672c\u6587\u6240\u8ff0\u7684\u6700\u4f73\u5b9e\u8df5\uff0c\u6211\u4eec\u53ef\u4ee5\u6700\u5927\u9650\u5ea6\u5730\u5229\u7528\u534f\u7a0b\u5e76\u69a8\u53d6\u6bcf\u4e00\u6ef4\u6027\u80fd\u3002,\u7406\u8bba\u8981\u638c\u63e1\uff0c\u5b9e\u64cd\u4e0d\u80fd\u843d\uff01\u4ee5\u4e0a\u5173\u4e8e\u300aGo \u534f\u7a0b\u4f18\u5316\u6307\u5357\uff1a\u69a8\u53d6\u6bcf\u4e00\u6ef4\u6027\u80fd\u300b\u7684\u8be6\u7ec6\u4ecb\u7ecd\uff0c\u5927\u5bb6\u90fd\u638c\u63e1\u4e86\u5427\uff01\u5982\u679c\u60f3\u8981\u7ee7\u7eed\u63d0\u5347\u81ea\u5df1\u7684\u80fd\u529b\uff0c\u90a3\u4e48\u5c31\u6765\u5173\u6ce8GOLANG\u516c\u4f17\u53f7\u5427\uff01,\u54c8\u55bd\uff01\u5927\u5bb6\u597d\uff0c\u5f88\u9ad8\u5174\u53c8\u89c1\u9762\u4e86\uff0c\u6211\u662fGOLANG\u7684\u4e00\u540d\u4f5c\u8005\uff0c\u4eca\u5929\u7531\u6211\u7ed9\u5927\u5bb6\u5e26\u6765\u4e00\u7bc7<br \/>\n<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\">\u300aGo \u534f\u7a0b\u4f18\u5316\u6307\u5357\uff1a\u69a8\u53d6\u6bcf\u4e00\u6ef4\u6027\u80fd\u300b<\/span>\uff0c\u672c\u6587\u4e3b\u8981\u4f1a\u8bb2\u5230<br \/>\n<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\"><\/span>\u7b49\u7b49\u77e5\u8bc6\u70b9\uff0c\u5e0c\u671b\u5927\u5bb6\u4e00\u8d77\u5b66\u4e60\u8fdb\u6b65\uff0c\u4e5f\u6b22\u8fce\u5927\u5bb6\u5173\u6ce8\u3001\u70b9\u8d5e\u3001\u6536\u85cf\u3001\u8f6c\u53d1! \u4e0b\u9762\u5c31\u4e00\u8d77\u6765\u770b\u770b\u5427\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>Go \u534f\u7a0b\u4f18\u5316\u6307\u5357\uff1a\u69a8\u53d6\u6bcf\u4e00\u6ef4\u6027\u80fd<\/span><\/p>\n<h1>Go \u534f\u7a0b\u4f18\u5316\u6307\u5357\uff1a\u69a8\u53d6\u6bcf\u4e00\u6ef4\u6027\u80fd<\/h1>\n<p><span>2024-10-27 21:53:55<\/span><br \/>\n<span><i><\/i>0\u6d4f\u89c8<\/span><br \/>\n<span style=\"cursor: pointer\"><i><\/i>\u6536\u85cf<\/span> <\/p>\n<p>\u54c8\u55bd\uff01\u5927\u5bb6\u597d\uff0c\u5f88\u9ad8\u5174\u53c8\u89c1\u9762\u4e86\uff0c\u6211\u662fGOLANG\u7684\u4e00\u540d\u4f5c\u8005\uff0c\u4eca\u5929\u7531\u6211\u7ed9\u5927\u5bb6\u5e26\u6765\u4e00\u7bc7<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\">\u300aGo \u534f\u7a0b\u4f18\u5316\u6307\u5357\uff1a\u69a8\u53d6\u6bcf\u4e00\u6ef4\u6027\u80fd\u300b<\/span>\uff0c\u672c\u6587\u4e3b\u8981\u4f1a\u8bb2\u5230<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\"><\/span>\u7b49\u7b49\u77e5\u8bc6\u70b9\uff0c\u5e0c\u671b\u5927\u5bb6\u4e00\u8d77\u5b66\u4e60\u8fdb\u6b65\uff0c\u4e5f\u6b22\u8fce\u5927\u5bb6\u5173\u6ce8\u3001\u70b9\u8d5e\u3001\u6536\u85cf\u3001\u8f6c\u53d1! \u4e0b\u9762\u5c31\u4e00\u8d77\u6765\u770b\u770b\u5427\uff01<\/p>\n<p>\u5982\u4f55\u4f18\u5316 Go \u534f\u7a0b\u6027\u80fd\uff1a\u9650\u5236\u5e76\u53d1\u5ea6\uff0c\u4ee5\u907f\u514d\u8fc7\u591a\u7684\u4e0a\u4e0b\u6587\u5207\u6362\u5f00\u9500\u3002\u4f7f\u7528\u534f\u7a0b\u6c60\uff0c\u4ee5\u91cd\u7528\u9884\u5148\u521b\u5efa\u7684\u534f\u7a0b\uff0c\u6d88\u9664\u521b\u5efa\u548c\u9500\u6bc1\u5f00\u9500\u3002\u786e\u4fdd\u5e76\u53d1\u5b89\u5168\uff0c\u9632\u6b62\u534f\u7a0b\u540c\u65f6\u8bbf\u95ee\u5171\u4eab\u6570\u636e\u3002\u907f\u514d\u963b\u585e\u64cd\u4f5c\uff0c\u4ee5\u4fdd\u6301\u5e76\u53d1\u6027\u3002\u8c03\u4f18 GOMAXPROCS \u73af\u5883\u53d8\u91cf\uff0c\u4ee5\u4f18\u5316 CPU \u5185\u6838\u4f7f\u7528\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20241027\/1730037219671e45e3f0b77.jpg\" class=\"aligncenter\"><\/p>\n<p><strong>Go \u534f\u7a0b\u4f18\u5316\u6307\u5357\uff1a\u69a8\u53d6\u6bcf\u4e00\u6ef4\u6027\u80fd<\/strong><\/p>\n<p><strong>\u7b80\u4ecb<\/strong><\/p>\n<p>\u534f\u7a0b\u662f Go \u8bed\u8a00\u4e2d\u4e00\u79cd\u8f7b\u91cf\u7ea7\u7ebf\u7a0b\uff0c\u53ef\u5e2e\u52a9\u5e76\u884c\u6267\u884c\u5927\u91cf\u4efb\u52a1\u3002\u901a\u8fc7\u4f18\u5316\u534f\u7a0b\uff0c\u6211\u4eec\u53ef\u4ee5\u663e\u8457\u63d0\u9ad8\u5e94\u7528\u7a0b\u5e8f\u7684\u6027\u80fd\u3002\u672c\u6307\u5357\u5c06\u4ecb\u7ecd\u51e0\u79cd\u63d0\u9ad8\u534f\u7a0b\u6027\u80fd\u7684\u6709\u6548\u6280\u672f\u3002<\/p>\n<p><strong>1. \u9650\u5236\u5e76\u53d1\u5ea6<\/strong><\/p>\n<p>\u5f53\u5e76\u53d1\u534f\u7a0b\u8fc7\u591a\u65f6\uff0c\u4f1a\u5bfc\u81f4\u4e0a\u4e0b\u6587\u5207\u6362\u5f00\u9500\u589e\u52a0\u3002\u4e3a\u4e86\u907f\u514d\u8fd9\u79cd\u60c5\u51b5\uff0c\u6211\u4eec\u9700\u8981\u9650\u5236\u5e94\u7528\u7a0b\u5e8f\u4e2d\u540c\u65f6\u8fd0\u884c\u7684\u534f\u7a0b\u6570\u91cf\u3002\u53ef\u4ee5\u4f7f\u7528 <code>Semaphore<\/code> \u6216 <code>sync.WaitGroup<\/code> \u7b49\u5e76\u53d1\u63a7\u5236\u673a\u5236\u6765\u5b9e\u73b0\u8fd9\u4e00\u70b9\u3002<\/p>\n<p><strong>2. \u5229\u7528 Goroutine \u6c60<\/strong><\/p>\n<p>\u9891\u7e41\u521b\u5efa\u548c\u9500\u6bc1\u534f\u7a0b\u4e5f\u662f\u6027\u80fd\u4f4e\u4e0b\u7684\u6839\u6e90\u3002\u4e3a\u4e86\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u534f\u7a0b\u6c60\uff0c\u5b83\u9884\u5148\u521b\u5efa\u534f\u7a0b\u5e76\u6839\u636e\u9700\u8981\u91cd\u7528\u5b83\u4eec\u3002\u8fd9\u6d88\u9664\u4e86\u521b\u5efa\u548c\u9500\u6bc1\u534f\u7a0b\u7684\u5f00\u9500\u3002<\/p>\n<p><strong>\u4ee3\u7801\u793a\u4f8b\uff1a<\/strong><\/p>\n<pre>import (\n    \"context\"\n    \"sync\"\n)\n\n\/\/ \u5b9a\u4e49\u4e00\u4e2a\u534f\u7a0b\u6c60\nvar pool = &amp;sync.Pool{\n    New: func() interface{} {\n        return goroutine()\n    },\n}\n\n\/\/ \u83b7\u53d6\u4e00\u4e2a\u534f\u7a0b\nfunc getGoroutine(ctx context.Context) (g *goroutine) {\n    if g = pool.Get().(*goroutine); g == nil {\n        g = new(goroutine)\n    }\n    \/\/ \u91cd\u7528\u534f\u7a0b\n    return\n}\n\n\/\/ \u91ca\u653e\u4e00\u4e2a\u534f\u7a0b\nfunc releaseGoroutine(g *goroutine) {\n    pool.Put(g) \/\/ \u5c06\u534f\u7a0b\u653e\u56de\u6c60\u4e2d\n}\n\n\/\/ \u534f\u7a0b\u7c7b\u578b\ntype goroutine struct {\n    cancel context.CancelFunc\n}<\/pre>\n<p><strong>3. \u5e76\u53d1\u5b89\u5168<\/strong><\/p>\n<p>\u5728\u5e76\u53d1\u73af\u5883\u4e2d\uff0c\u534f\u7a0b\u53ef\u80fd\u4f1a\u540c\u65f6\u8bbf\u95ee\u5171\u4eab\u6570\u636e\uff0c\u56e0\u6b64\u786e\u4fdd\u5e76\u53d1\u5b89\u5168\u81f3\u5173\u91cd\u8981\u3002\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528\u8bf8\u5982 <code>sync.Mutex<\/code> \u6216 <code>sync.RWMutex<\/code> \u7b49\u9501\u6765\u5b9e\u73b0\u6b64\u76ee\u7684\u3002<\/p>\n<p><strong>4. \u907f\u514d\u963b\u585e\u64cd\u4f5c<\/strong><\/p>\n<p>\u963b\u585e\u64cd\u4f5c\u4f1a\u963b\u6b62\u534f\u7a0b\u6267\u884c\uff0c\u4ece\u800c\u9650\u5236\u5e76\u53d1\u6027\u3002\u5e94\u59cb\u7ec8\u5c06\u963b\u585e\u64cd\u4f5c\u79fb\u5230\u5355\u72ec\u7684\u534f\u7a0b\u4e2d\u6216\u4f7f\u7528\u975e\u963b\u585e\u66ff\u4ee3\u65b9\u6848\u3002<\/p>\n<p><strong>5. \u8c03\u4f18 GOMAXPROCS<\/strong><\/p>\n<p><code>GOMAXPROCS<\/code> \u73af\u5883\u53d8\u91cf\u63a7\u5236\u53ef\u540c\u65f6\u8fd0\u884c\u7684 CPU \u5185\u6838\u6570\u91cf\u3002\u6839\u636e\u7cfb\u7edf\u7684 CPU \u5185\u6838\u6570\u91cf\u548c\u5e94\u7528\u7a0b\u5e8f\u7684\u7279\u6027\u8fdb\u884c\u8c03\u6574\u53ef\u4ee5\u63d0\u9ad8\u6027\u80fd\u3002<\/p>\n<p><strong>\u5b9e\u6218\u6848\u4f8b\uff1a\u7f51\u7edc\u670d\u52a1<\/strong><\/p>\n<p>\u5728\u7f51\u7edc\u670d\u52a1\u4e2d\uff0c\u534f\u7a0b\u53ef\u7528\u4e8e\u5e76\u884c\u5904\u7406\u4f20\u5165\u8bf7\u6c42\u3002\u901a\u8fc7\u9650\u5236\u5e76\u53d1\u5ea6\u3001\u4f7f\u7528\u534f\u7a0b\u6c60\u548c\u907f\u514d\u963b\u585e\u64cd\u4f5c\uff0c\u6211\u4eec\u53ef\u4ee5\u663e\u8457\u63d0\u9ad8\u670d\u52a1\u7684\u54cd\u5e94\u80fd\u529b\u548c\u541e\u5410\u91cf\u3002<\/p>\n<p><strong>\u7ed3\u8bba<\/strong><\/p>\n<p>\u4f18\u5316\u534f\u7a0b\u662f\u63d0\u9ad8 Go \u5e94\u7528\u7a0b\u5e8f\u6027\u80fd\u7684\u91cd\u8981\u4e00\u6b65\u3002\u901a\u8fc7\u9075\u5faa\u672c\u6587\u6240\u8ff0\u7684\u6700\u4f73\u5b9e\u8df5\uff0c\u6211\u4eec\u53ef\u4ee5\u6700\u5927\u9650\u5ea6\u5730\u5229\u7528\u534f\u7a0b\u5e76\u69a8\u53d6\u6bcf\u4e00\u6ef4\u6027\u80fd\u3002<\/p>\n<p>\u7406\u8bba\u8981\u638c\u63e1\uff0c\u5b9e\u64cd\u4e0d\u80fd\u843d\uff01\u4ee5\u4e0a\u5173\u4e8e\u300aGo \u534f\u7a0b\u4f18\u5316\u6307\u5357\uff1a\u69a8\u53d6\u6bcf\u4e00\u6ef4\u6027\u80fd\u300b\u7684\u8be6\u7ec6\u4ecb\u7ecd\uff0c\u5927\u5bb6\u90fd\u638c\u63e1\u4e86\u5427\uff01\u5982\u679c\u60f3\u8981\u7ee7\u7eed\u63d0\u5347\u81ea\u5df1\u7684\u80fd\u529b\uff0c\u90a3\u4e48\u5c31\u6765\u5173\u6ce8GOLANG\u516c\u4f17\u53f7\u5427\uff01<\/p>\n<dl>\n<dt>\n <\/dt>\n<dd>\n   \u8f93\u5165\u53ea\u80fd\u662f\u6570\u5b57\uff0c\u9996\u4f4d\u53ef\u5426\u4e3a\u201c-\u201d\u7684\u6b63\u5219\u8868\u8fbe\u5f0f\u662f\u4ec0\u4e48\uff1f\n <\/dd>\n<\/dl>\n<dl>\n<dt>\n <\/dt>\n<dd>\n   \u5982\u4f55\u5728Windows\u4e2d\u67e5\u770b\u9690\u85cf\u7684\u8bbe\u5907\n <\/dd>\n<\/dl>\n","protected":false},"excerpt":{"rendered":"<p>\u54c8\u55bd\uff01\u5927\u5bb6\u597d\uff0c\u5f88\u9ad8\u5174\u53c8\u89c1\u9762\u4e86\uff0c\u6211&#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-205905","post","type-post","status-publish","format-standard","hentry","category-4925"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/205905","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=205905"}],"version-history":[{"count":0,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/205905\/revisions"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=205905"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=205905"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=205905"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}