{"id":205880,"date":"2025-06-12T08:59:19","date_gmt":"2025-06-12T00:59:19","guid":{"rendered":"https:\/\/server.hk\/cnblog\/205880\/"},"modified":"2025-06-12T08:59:19","modified_gmt":"2025-06-12T00:59:19","slug":"golang-%e5%87%bd%e6%95%b0%e9%81%8d%e5%8e%86%e6%95%b0%e6%8d%ae%e7%bb%93%e6%9e%84%e6%97%b6%e5%a6%82%e4%bd%95%e5%a4%84%e7%90%86%e9%94%99%e8%af%af%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/205880\/","title":{"rendered":"Golang \u51fd\u6570\u904d\u5386\u6570\u636e\u7ed3\u6784\u65f6\u5982\u4f55\u5904\u7406\u9519\u8bef\uff1f"},"content":{"rendered":"<p>GOLANG\u5c0f\u767d\u4e00\u679a\uff0c\u6b63\u5728\u4e0d\u65ad\u5b66\u4e60\u79ef\u7d2f\u77e5\u8bc6\uff0c\u73b0\u5c06\u5b66\u4e60\u5230\u7684\u77e5\u8bc6\u8bb0\u5f55\u4e00\u4e0b\uff0c\u4e5f\u662f\u5c06\u6211\u7684\u6240\u5f97\u5206\u4eab\u7ed9\u5927\u5bb6\uff01\u800c\u4eca\u5929\u8fd9\u7bc7\u6587\u7ae0\u300aGOLANG \u51fd\u6570\u904d\u5386\u6570\u636e\u7ed3\u6784\u65f6\u5982\u4f55\u5904\u7406\u9519\u8bef\uff1f\u300b\u5e26\u5927\u5bb6\u6765\u4e86\u89e3\u4e00\u4e0b##content_title##\uff0c\u5e0c\u671b\u5bf9\u5927\u5bb6\u7684\u77e5\u8bc6\u79ef\u7d2f\u6709\u6240\u5e2e\u52a9\uff0c\u4ece\u800c\u5f25\u8865\u81ea\u5df1\u7684\u4e0d\u8db3\uff0c\u52a9\u529b\u5b9e\u6218\u5f00\u53d1\uff01,<br \/>\n<br \/>,\u5728 Go \u4e2d\u904d\u5386\u6570\u636e\u7ed3\u6784\u65f6\uff0c\u5904\u7406\u9519\u8bef\u81f3\u5173\u91cd\u8981\u3002Go \u63d0\u4f9b\u4e86\u4ee5\u4e0b\u673a\u5236\uff1a\u9519\u8bef\u68c0\u67e5\uff1a\u9010\u4e00\u68c0\u67e5\u5143\u7d20\u6216\u952e\u503c\u5bf9\uff0c\u5904\u7406\u9519\u8bef\u3002\u5ef6\u8fdf + \u5173\u95ed\uff1a\u4f7f\u7528 defer \u548c Close \u786e\u4fdd\u5728\u53d1\u751f\u9519\u8bef\u65f6\u5173\u95ed\u6216\u91ca\u653e\u8d44\u6e90\u3002\u6050\u614c + \u6062\u590d\uff1a\u4f7f\u7528 panic \u53d1\u51fa\u4e25\u91cd\u9519\u8bef\u7684\u4fe1\u53f7\uff0c\u5e76\u4f7f\u7528 recover \u6355\u83b7\u548c\u5904\u7406\u9519\u8bef\u3002\u901a\u8fc7\u4f7f\u7528\u8fd9\u4e9b\u673a\u5236\uff0c\u53ef\u4ee5\u7f16\u5199\u5065\u58ee\u4e14\u53ef\u9760\u7684 Go \u4ee3\u7801\u3002,<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20241027\/1730027685671e20a56bb4b.jpg\" class=\"aligncenter\">,<br \/>\n<strong>Go \u904d\u5386\u6570\u636e\u7ed3\u6784\u65f6\u4f18\u96c5\u5730\u5904\u7406\u9519\u8bef<\/strong>,\u5728\u904d\u5386\u6570\u636e\u7ed3\u6784\uff08\u4f8b\u5982\u6570\u7ec4\u3001\u5207\u7247\u3001\u6620\u5c04\u6216\u94fe\u8868\uff09\u65f6\uff0c\u5904\u7406\u9519\u8bef\u81f3\u5173\u91cd\u8981\uff0c\u4ee5\u786e\u4fdd\u4ee3\u7801\u7684\u5065\u58ee\u6027\u548c\u53ef\u9760\u6027\u3002Go \u63d0\u4f9b\u4e86\u591a\u79cd\u673a\u5236\uff0c\u53ef\u7528\u4e8e\u4f18\u96c5\u5730\u5904\u7406\u9519\u8bef\u3002,<br \/>\n<strong>\u9519\u8bef\u7c7b\u578b<\/strong>,Go \u4e2d\u6709\u4e24\u79cd\u4e3b\u8981\u7684\u9519\u8bef\u7c7b\u578b\uff1a<br \/>\n<code>error<\/code> \u548c<br \/>\n<code>nil<\/code>\u3002<br \/>\n<code>error<\/code> \u8868\u793a\u4e00\u79cd\u9519\u8bef\u60c5\u51b5\uff0c\u800c<br \/>\n<code>nil<\/code> \u8868\u793a\u6ca1\u6709\u9519\u8bef\u3002,<br \/>\n<strong>\u5904\u7406\u9519\u8bef\u7684\u673a\u5236<\/strong>,\u4ee5\u4e0b\u662f Go \u4e2d\u5904\u7406\u9519\u8bef\u7684\u5e38\u89c1\u673a\u5236\uff1a,<br \/>\n<strong>\u5b9e\u6218\u6848\u4f8b<\/strong>,\u8003\u8651\u4ee5\u4e0b\u904d\u5386\u6620\u5c04\u7684\u793a\u4f8b\uff1a,\u5728\u4e0a\u8ff0\u793a\u4f8b\u4e2d\uff0c\u5982\u679c\u5728<br \/>\n<code>otherMap<\/code> \u4e2d\u627e\u4e0d\u5230\u5339\u914d\u7684\u503c\uff0c\u5219\u6211\u4eec\u5e0c\u671b\u5ffd\u7565\u8be5\u9519\u8bef\u5e76\u7ee7\u7eed\u5904\u7406\u5176\u4ed6\u5143\u7d20\u3002\u8981\u505a\u5230\u8fd9\u4e00\u70b9\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u7b80\u5355\u7684<br \/>\n<code>\u5ffd\u7565\u9519\u8bef<\/code> \u6a21\u5f0f\uff1a,\u901a\u8fc7\u4f7f\u7528<br \/>\n<code>_, ok<\/code> \u8bed\u6cd5\uff0c\u6211\u4eec\u6709\u6548\u5730\u5ffd\u7565\u4e86 any \u9519\u8bef\u503c\u3002,<br \/>\n<strong>\u7ed3\u8bba<\/strong>,\u901a\u8fc7\u4f7f\u7528\u9519\u8bef\u68c0\u67e5\u3001<br \/>\n<code>defer<\/code> +<br \/>\n<code>Close<\/code> \u6216<br \/>\n<code>panic<\/code> +<br \/>\n<code>recover<\/code>\uff0c\u53ef\u4ee5\u5728\u904d\u5386\u6570\u636e\u7ed3\u6784\u65f6\u4f18\u96c5\u5730\u5904\u7406\u9519\u8bef\u3002\u4e86\u89e3\u8fd9\u4e9b\u673a\u5236\u81f3\u5173\u91cd\u8981\uff0c\u8fd9\u6837\u6211\u4eec\u624d\u80fd\u7f16\u5199\u5065\u58ee\u4e14\u53ef\u9760\u7684 Go \u4ee3\u7801\u3002,\u5230\u8fd9\u91cc\uff0c\u6211\u4eec\u4e5f\u5c31\u8bb2\u5b8c\u4e86\u300aGOLANG \u51fd\u6570\u904d\u5386\u6570\u636e\u7ed3\u6784\u65f6\u5982\u4f55\u5904\u7406\u9519\u8bef\uff1f\u300b\u7684\u5185\u5bb9\u4e86\u3002\u4e2a\u4eba\u8ba4\u4e3a\uff0c\u57fa\u7840\u77e5\u8bc6\u7684\u5b66\u4e60\u548c\u5de9\u56fa\uff0c\u662f\u4e3a\u4e86\u66f4\u597d\u7684\u5c06\u5176\u8fd0\u7528\u5230\u9879\u76ee\u4e2d\uff0c\u6b22\u8fce\u5173\u6ce8GOLANG\u516c\u4f17\u53f7\uff0c\u5e26\u4f60\u4e86\u89e3\u66f4\u591a\u5173\u4e8egolang,\u9519\u8bef\u5904\u7406\u7684\u77e5\u8bc6\u70b9\uff01,<\/p>\n<p><strong>Defer + Close (\u5ef6\u8fdf + \u5173\u95ed)<\/strong>\uff1a\u4f7f\u7528 <code>defer<\/code> \u548c <code>Close<\/code> \u4fdd\u8bc1\u5f53\u53d1\u751f\u9519\u8bef\u65f6\u5173\u95ed\u6216\u91ca\u653e\u8d44\u6e90\u3002<\/p>\n<pre>defer myFile.Close()\nif err := doSomething(myFile); err != nil {\n    \/\/ Handle the error\n}<\/pre>\n<p>,<\/p>\n<p><strong>Error Checking (\u9519\u8bef\u68c0\u67e5)<\/strong>\uff1a\u9010\u4e00\u68c0\u67e5\u6bcf\u4e2a\u5143\u7d20\u6216\u952e\u503c\u5bf9\uff0c\u5e76\u6839\u636e\u9700\u8981\u5904\u7406\u7531\u6b64\u4ea7\u751f\u7684\u9519\u8bef\u3002<\/p>\n<pre>for i, v := range myArray {\n    if err := doSomething(v); err != nil {\n        \/\/ Handle the error\n    }\n}<\/pre>\n<p>,<\/p>\n<p><strong>Panic + Recover (\u6050\u614c + \u6062\u590d)<\/strong>\uff1a\u5728\u53d1\u751f\u4e25\u91cd\u9519\u8bef\u65f6\u4f7f\u7528 <code>panic<\/code> \u53d1\u51fa\u4fe1\u53f7\uff0c\u5e76\u5728\u7a0d\u540e\u4f7f\u7528 <code>recover<\/code> \u6355\u83b7\u8be5\u9519\u8bef\u5e76\u8fdb\u884c\u5904\u7406\u3002<\/p>\n<pre>func doSomething(v interface{}) {\n    defer func() {\n        if err := recover(); err != nil {\n            \/\/ Handle the error\n        }\n    }()\n    \/\/ \u64cd\u4f5c\u5bfc\u81f4\u9519\u8bef\u7684\u4ee3\u7801\n}<\/pre>\n<p>,GOLANG\u5c0f\u767d\u4e00\u679a\uff0c\u6b63\u5728\u4e0d\u65ad\u5b66\u4e60\u79ef\u7d2f\u77e5\u8bc6\uff0c\u73b0\u5c06\u5b66\u4e60\u5230\u7684\u77e5\u8bc6\u8bb0\u5f55\u4e00\u4e0b\uff0c\u4e5f\u662f\u5c06\u6211\u7684\u6240\u5f97\u5206\u4eab\u7ed9\u5927\u5bb6\uff01\u800c\u4eca\u5929\u8fd9\u7bc7\u6587\u7ae0\u300aGOLANG \u51fd\u6570\u904d\u5386\u6570\u636e\u7ed3\u6784\u65f6\u5982\u4f55\u5904\u7406\u9519\u8bef\uff1f\u300b\u5e26\u5927\u5bb6\u6765\u4e86\u89e3\u4e00\u4e0b##content_title##\uff0c\u5e0c\u671b\u5bf9\u5927\u5bb6\u7684\u77e5\u8bc6\u79ef\u7d2f\u6709\u6240\u5e2e\u52a9\uff0c\u4ece\u800c\u5f25\u8865\u81ea\u5df1\u7684\u4e0d\u8db3\uff0c\u52a9\u529b\u5b9e\u6218\u5f00\u53d1\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\u904d\u5386\u6570\u636e\u7ed3\u6784\u65f6\u5982\u4f55\u5904\u7406\u9519\u8bef\uff1f<\/span><\/p>\n<h1>GOLANG \u51fd\u6570\u904d\u5386\u6570\u636e\u7ed3\u6784\u65f6\u5982\u4f55\u5904\u7406\u9519\u8bef\uff1f<\/h1>\n<p><span>2024-10-27 19:15:00<\/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\u5c0f\u767d\u4e00\u679a\uff0c\u6b63\u5728\u4e0d\u65ad\u5b66\u4e60\u79ef\u7d2f\u77e5\u8bc6\uff0c\u73b0\u5c06\u5b66\u4e60\u5230\u7684\u77e5\u8bc6\u8bb0\u5f55\u4e00\u4e0b\uff0c\u4e5f\u662f\u5c06\u6211\u7684\u6240\u5f97\u5206\u4eab\u7ed9\u5927\u5bb6\uff01\u800c\u4eca\u5929\u8fd9\u7bc7\u6587\u7ae0\u300aGOLANG \u51fd\u6570\u904d\u5386\u6570\u636e\u7ed3\u6784\u65f6\u5982\u4f55\u5904\u7406\u9519\u8bef\uff1f\u300b\u5e26\u5927\u5bb6\u6765\u4e86\u89e3\u4e00\u4e0b##content_title##\uff0c\u5e0c\u671b\u5bf9\u5927\u5bb6\u7684\u77e5\u8bc6\u79ef\u7d2f\u6709\u6240\u5e2e\u52a9\uff0c\u4ece\u800c\u5f25\u8865\u81ea\u5df1\u7684\u4e0d\u8db3\uff0c\u52a9\u529b\u5b9e\u6218\u5f00\u53d1\uff01<\/p>\n<p><\/p>\n<p>\u5728 Go \u4e2d\u904d\u5386\u6570\u636e\u7ed3\u6784\u65f6\uff0c\u5904\u7406\u9519\u8bef\u81f3\u5173\u91cd\u8981\u3002Go \u63d0\u4f9b\u4e86\u4ee5\u4e0b\u673a\u5236\uff1a\u9519\u8bef\u68c0\u67e5\uff1a\u9010\u4e00\u68c0\u67e5\u5143\u7d20\u6216\u952e\u503c\u5bf9\uff0c\u5904\u7406\u9519\u8bef\u3002\u5ef6\u8fdf + \u5173\u95ed\uff1a\u4f7f\u7528 defer \u548c Close \u786e\u4fdd\u5728\u53d1\u751f\u9519\u8bef\u65f6\u5173\u95ed\u6216\u91ca\u653e\u8d44\u6e90\u3002\u6050\u614c + \u6062\u590d\uff1a\u4f7f\u7528 panic \u53d1\u51fa\u4e25\u91cd\u9519\u8bef\u7684\u4fe1\u53f7\uff0c\u5e76\u4f7f\u7528 recover \u6355\u83b7\u548c\u5904\u7406\u9519\u8bef\u3002\u901a\u8fc7\u4f7f\u7528\u8fd9\u4e9b\u673a\u5236\uff0c\u53ef\u4ee5\u7f16\u5199\u5065\u58ee\u4e14\u53ef\u9760\u7684 Go \u4ee3\u7801\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20241027\/1730027685671e20a56bb4b.jpg\" class=\"aligncenter\"><\/p>\n<p><strong>Go \u904d\u5386\u6570\u636e\u7ed3\u6784\u65f6\u4f18\u96c5\u5730\u5904\u7406\u9519\u8bef<\/strong><\/p>\n<p>\u5728\u904d\u5386\u6570\u636e\u7ed3\u6784\uff08\u4f8b\u5982\u6570\u7ec4\u3001\u5207\u7247\u3001\u6620\u5c04\u6216\u94fe\u8868\uff09\u65f6\uff0c\u5904\u7406\u9519\u8bef\u81f3\u5173\u91cd\u8981\uff0c\u4ee5\u786e\u4fdd\u4ee3\u7801\u7684\u5065\u58ee\u6027\u548c\u53ef\u9760\u6027\u3002Go \u63d0\u4f9b\u4e86\u591a\u79cd\u673a\u5236\uff0c\u53ef\u7528\u4e8e\u4f18\u96c5\u5730\u5904\u7406\u9519\u8bef\u3002<\/p>\n<p><strong>\u9519\u8bef\u7c7b\u578b<\/strong><\/p>\n<p>Go \u4e2d\u6709\u4e24\u79cd\u4e3b\u8981\u7684\u9519\u8bef\u7c7b\u578b\uff1a<code>error<\/code> \u548c <code>nil<\/code>\u3002<code>error<\/code> \u8868\u793a\u4e00\u79cd\u9519\u8bef\u60c5\u51b5\uff0c\u800c <code>nil<\/code> \u8868\u793a\u6ca1\u6709\u9519\u8bef\u3002<\/p>\n<p><strong>\u5904\u7406\u9519\u8bef\u7684\u673a\u5236<\/strong><\/p>\n<p>\u4ee5\u4e0b\u662f Go \u4e2d\u5904\u7406\u9519\u8bef\u7684\u5e38\u89c1\u673a\u5236\uff1a<\/p>\n<ul>\n<li>\n<p><strong>Error Checking (\u9519\u8bef\u68c0\u67e5)<\/strong>\uff1a\u9010\u4e00\u68c0\u67e5\u6bcf\u4e2a\u5143\u7d20\u6216\u952e\u503c\u5bf9\uff0c\u5e76\u6839\u636e\u9700\u8981\u5904\u7406\u7531\u6b64\u4ea7\u751f\u7684\u9519\u8bef\u3002<\/p>\n<pre>for i, v := range myArray {\n    if err := doSomething(v); err != nil {\n        \/\/ Handle the error\n    }\n}<\/pre>\n<\/li>\n<li>\n<p><strong>Defer + Close (\u5ef6\u8fdf + \u5173\u95ed)<\/strong>\uff1a\u4f7f\u7528 <code>defer<\/code> \u548c <code>Close<\/code> \u4fdd\u8bc1\u5f53\u53d1\u751f\u9519\u8bef\u65f6\u5173\u95ed\u6216\u91ca\u653e\u8d44\u6e90\u3002<\/p>\n<pre>defer myFile.Close()\nif err := doSomething(myFile); err != nil {\n    \/\/ Handle the error\n}<\/pre>\n<\/li>\n<li>\n<p><strong>Panic + Recover (\u6050\u614c + \u6062\u590d)<\/strong>\uff1a\u5728\u53d1\u751f\u4e25\u91cd\u9519\u8bef\u65f6\u4f7f\u7528 <code>panic<\/code> \u53d1\u51fa\u4fe1\u53f7\uff0c\u5e76\u5728\u7a0d\u540e\u4f7f\u7528 <code>recover<\/code> \u6355\u83b7\u8be5\u9519\u8bef\u5e76\u8fdb\u884c\u5904\u7406\u3002<\/p>\n<pre>func doSomething(v interface{}) {\n    defer func() {\n        if err := recover(); err != nil {\n            \/\/ Handle the error\n        }\n    }()\n    \/\/ \u64cd\u4f5c\u5bfc\u81f4\u9519\u8bef\u7684\u4ee3\u7801\n}<\/pre>\n<\/li>\n<\/ul>\n<p><strong>\u5b9e\u6218\u6848\u4f8b<\/strong><\/p>\n<p>\u8003\u8651\u4ee5\u4e0b\u904d\u5386\u6620\u5c04\u7684\u793a\u4f8b\uff1a<\/p>\n<pre>myMap := map[string]string{\n    \"key1\": \"value1\",\n    \"key2\": \"value2\",\n    \"key3\": \"value3\",\n}\n\nfor key, value := range myMap {\n    \/\/ \u5c1d\u8bd5\u67e5\u627e\u53e6\u4e00\u4e2a\u6620\u5c04\u4e2d\u7684\u503c\n    if foundValue, ok := otherMap[key]; ok {\n        fmt.Printf(\"Found matching value: %s\", foundValue)\n    } else {\n        \/\/ \u627e\u4e0d\u5230\u5339\u914d\u7684\u503c\uff0c\u5ffd\u7565\u5e76\u7ee7\u7eed\n        \/\/ \u7701\u7565\u9519\u8bef\u5904\u7406\u4ee3\u7801\n    }\n}<\/pre>\n<p>\u5728\u4e0a\u8ff0\u793a\u4f8b\u4e2d\uff0c\u5982\u679c\u5728 <code>otherMap<\/code> \u4e2d\u627e\u4e0d\u5230\u5339\u914d\u7684\u503c\uff0c\u5219\u6211\u4eec\u5e0c\u671b\u5ffd\u7565\u8be5\u9519\u8bef\u5e76\u7ee7\u7eed\u5904\u7406\u5176\u4ed6\u5143\u7d20\u3002\u8981\u505a\u5230\u8fd9\u4e00\u70b9\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u7b80\u5355\u7684 <code>\u5ffd\u7565\u9519\u8bef<\/code> \u6a21\u5f0f\uff1a<\/p>\n<pre>\/\/ \u5c1d\u8bd5\u67e5\u627e\u53e6\u4e00\u4e2a\u6620\u5c04\u4e2d\u7684\u503c\nif _, ok := otherMap[key]; !ok {\n    \/\/ \u627e\u4e0d\u5230\u5339\u914d\u7684\u503c\uff0c\u5ffd\u7565\u5e76\u7ee7\u7eed\n}<\/pre>\n<p>\u901a\u8fc7\u4f7f\u7528 <code>_, ok<\/code> \u8bed\u6cd5\uff0c\u6211\u4eec\u6709\u6548\u5730\u5ffd\u7565\u4e86 any \u9519\u8bef\u503c\u3002<\/p>\n<p><strong>\u7ed3\u8bba<\/strong><\/p>\n<p>\u901a\u8fc7\u4f7f\u7528\u9519\u8bef\u68c0\u67e5\u3001<code>defer<\/code> + <code>Close<\/code> \u6216 <code>panic<\/code> + <code>recover<\/code>\uff0c\u53ef\u4ee5\u5728\u904d\u5386\u6570\u636e\u7ed3\u6784\u65f6\u4f18\u96c5\u5730\u5904\u7406\u9519\u8bef\u3002\u4e86\u89e3\u8fd9\u4e9b\u673a\u5236\u81f3\u5173\u91cd\u8981\uff0c\u8fd9\u6837\u6211\u4eec\u624d\u80fd\u7f16\u5199\u5065\u58ee\u4e14\u53ef\u9760\u7684 Go \u4ee3\u7801\u3002<\/p>\n<p>\u5230\u8fd9\u91cc\uff0c\u6211\u4eec\u4e5f\u5c31\u8bb2\u5b8c\u4e86\u300aGOLANG \u51fd\u6570\u904d\u5386\u6570\u636e\u7ed3\u6784\u65f6\u5982\u4f55\u5904\u7406\u9519\u8bef\uff1f\u300b\u7684\u5185\u5bb9\u4e86\u3002\u4e2a\u4eba\u8ba4\u4e3a\uff0c\u57fa\u7840\u77e5\u8bc6\u7684\u5b66\u4e60\u548c\u5de9\u56fa\uff0c\u662f\u4e3a\u4e86\u66f4\u597d\u7684\u5c06\u5176\u8fd0\u7528\u5230\u9879\u76ee\u4e2d\uff0c\u6b22\u8fce\u5173\u6ce8GOLANG\u516c\u4f17\u53f7\uff0c\u5e26\u4f60\u4e86\u89e3\u66f4\u591a\u5173\u4e8egolang,\u9519\u8bef\u5904\u7406\u7684\u77e5\u8bc6\u70b9\uff01<\/p>\n<dl>\n<dt>\n <\/dt>\n<dd>\n   GOLANG \u4e2d\u533f\u540d\u51fd\u6570\u7684\u6027\u80fd\u5bf9\u6bd4\u5176\u4ed6\u51fd\u6570\u7c7b\u578b\u5982\u4f55\uff1f\n <\/dd>\n<\/dl>\n<dl>\n<dt>\n <\/dt>\n<dd>\n   \u5982\u4f55\u9632\u6b62 absolute \u5143\u7d20\u5728\u4f7f\u7528 outline \u65f6\u88ab\u6491\u5f00\uff1f\n <\/dd>\n<\/dl>\n","protected":false},"excerpt":{"rendered":"<p>GOLANG\u5c0f\u767d\u4e00\u679a\uff0c\u6b63\u5728\u4e0d\u65ad\u5b66&#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-205880","post","type-post","status-publish","format-standard","hentry","category-4925"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/205880","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=205880"}],"version-history":[{"count":0,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/205880\/revisions"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=205880"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=205880"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=205880"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}