{"id":2764,"date":"2020-12-27T19:38:16","date_gmt":"2020-12-27T11:38:16","guid":{"rendered":"http:\/\/blog.ywdevops.cn\/?p=2764"},"modified":"2025-05-09T11:54:34","modified_gmt":"2025-05-09T03:54:34","slug":"go-2","status":"publish","type":"post","link":"https:\/\/blog.ywdevops.cn\/index.php\/2020\/12\/27\/go-2\/","title":{"rendered":"Go\u8bed\u8a00\u4e4b\u6570\u636e\u7c7b\u578b"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Go\u662f\u4e00\u79cd\u9759\u6001\u7c7b\u578b\u8bed\u8a00\uff0c\u6240\u8c13\u9759\u6001\u7c7b\u578b\u8bed\u8a00(\u5f3a\u7c7b\u578b\u8bed\u8a00)\uff0c\u662f\u6307\u9519\u8bef\u7684\u4f7f\u7528\u4e86\u7c7b\u578b\u65f6\uff0c\u7f16\u8bd1\u5668\u5c06\u5f15\u53d1\u9519\u8bef\uff0c\u6240\u8c13\u52a8\u6001\u7c7b\u578b\u8bed\u8a00(\u4e5f\u79f0\u4e3a\u5f31\u7c7b\u578b\u6216\u8005\u677e\u6563\u7c7b\u578b\u8bed\u8a00)\uff0c\u6307\u7684\u662f\u4e3a\u4e86\u6267\u884c\u7a0b\u5e8f\uff0c\u8fd0\u884c\u65f6\u4f1a\u5c06\u4e00\u79cd\u7c7b\u578b\u8f6c\u6362\u4e3a\u53e6\u4e00\u79cd\u7c7b\u578b\uff0c\u53ef\u4ee5\u5b9e\u73b0\u52a8\u6001\u8f6c\u6362<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u9759\u6001\u7c7b\u578b\u8bed\u8a00\u7684\u4f18\u70b9\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u6027\u80fd\u9ad8\u4e8e\u52a8\u6001\u7c7b\u578b\u8bed\u8a00<\/li>\n\n\n\n<li>Bug\u901a\u5e38\u4f1a\u88ab\u7f16\u8bd1\u5668\u53d1\u73b0<\/li>\n\n\n\n<li>\u4ee3\u7801\u7f16\u8bd1\u5668\u53ef\u63d0\u4f9b\u4ee3\u7801\u8865\u5168\u548c\u5176\u4ed6\u529f\u80fd<\/li>\n\n\n\n<li>\u6570\u636e\u5b8c\u6574\u6027\u66f4\u597d<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u52a8\u6001\u7c7b\u578b\u8bed\u8a00\u7684\u4f18\u70b9\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u4f7f\u7528\u52a8\u6001\u7c7b\u578b\u8bed\u8a00\u7f16\u5199\u7684\u8f6f\u4ef6\u901f\u5ea6\u901a\u5e38\u66f4\u5feb<\/li>\n\n\n\n<li>\u65e0\u987b\u4e3a\u6267\u884c\u4ee3\u7801\u800c\u7b49\u5f85\u7f16\u8bd1\u5668\u5b8c\u6210\u7f16\u8bd1<\/li>\n\n\n\n<li>\u52a8\u6001\u7c7b\u578b\u8bed\u8a00\u4e0d\u6b7b\u677f\uff0c\u53d8\u66f4\u4ee3\u7801\u5bb9\u6613<\/li>\n\n\n\n<li>\u5b66\u4e60\u95e8\u69db\u4f4e<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Go \u8bed\u8a00\u4e2d\u6709\u4e30\u5bcc\u7684\u6570\u636e\u7c7b\u578b\uff0c\u9664\u4e86\u57fa\u672c\u7684\u6574\u578b\u3001\u6d6e\u70b9\u578b\u3001\u5e03\u5c14\u578b\u3001\u5b57\u7b26\u4e32\u5916\uff0c\u8fd8\u6709\u5207\u7247\u3001\u7ed3\u6784\u4f53\u3001\u51fd\u6570\u3001map \u3001\u901a\u9053\uff08 channel \uff09\u7b49\uff0c\u5207\u7247\u7c7b\u578b\u6709\u7740\u6307\u9488\u7684\u4fbf\u5229\u6027\uff0c\u4f46\u6bd4\u6307\u9488\u66f4\u4e3a\u5b89\u5168\uff0c \u5f88\u591a\u9ad8\u7ea7\u8bed\u8a00\u90fd\u914d\u6709\u5207\u7247\u8fdb\u884c\u5b89\u5168\u548c\u9ad8\u6548\u7387\u7684\u5185\u5b58\u64cd\u4f5c\u3002 \u7ed3\u6784\u4f53\u662fGo \u8bed\u8a00\u57fa\u7840\u7684\u590d\u6742\u7c7b\u578b\u4e4b\u4e00\uff0c\u51fd\u6570\u4e5f\u662fGo \u8bed\u8a00\u7684\u4e00\u79cd\u6570\u636e\u7c7b\u578b\uff0cmap \u548c\u5207\u7247\u662f\u5f00\u53d1\u4e2d\u5e38\u89c1\u7684\u6570\u636e\u5bb9\u5668\u7c7b\u578b\u3002<\/p>\n\n\n\n<p class=\"has-text-align-left has-medium-font-size wp-block-paragraph\"><strong>\u4e00\u3001\u6574\u578b\uff1a<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6574\u578b\u5206\u4e3a\u4ee5\u4e0b\u4e24\u4e2a\u5927\u7c7b\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u6309\u957f\u5ea6\u5206\u4e3a\uff1a int8 \u3001int16 \u3001int32 \u3001int64<\/li>\n\n\n\n<li>\u8fd8\u6709\u5bf9\u5e94\u7684\u65e0\u7b26\u53f7\u6574\u578b\uff1a uint8 \u3001uint16 \u3001uint32 \u3001uint64 \u3002<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u533a\u522b\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"629\" height=\"555\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/12\/27.png\" alt=\"\" class=\"wp-image-2767\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/12\/27.png 629w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/12\/27-300x265.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/12\/27-600x529.png 600w\" sizes=\"auto, (max-width: 629px) 100vw, 629px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u6709\u7b26\u53f7\u6574\u6570\u4f7f\u7528\u6700\u9ad8\u4f4d\uff08\u5373\u6700\u5de6\u8fb9\u7684\u4f4d\uff09\u6765\u8868\u793a\u7b26\u53f7\uff0c0\u8868\u793a\u6b63\u6570\uff0c1\u8868\u793a\u8d1f\u6570\u3002\u5176\u4f59\u4f4d\u8868\u793a\u6570\u503c<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5bf9\u4e8e\u4e00\u4e2an\u4f4d\u7684\u6709\u7b26\u53f7\u6574\u6570\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u6700\u5927\u503c\uff1a2<sup>n-1<\/sup> \u22121  \u4f8b\u5982\uff1aint8\u7684\u6700\u5927\u503c\u4e3a127<\/li>\n\n\n\n<li>\u6700\u5c0f\u503c\uff1a\u22122<sup>n-1<\/sup>     \u4f8b\u5982\uff1a int8\u7684\u6700\u5c0f\u503c\u4e3a-128<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u65e0\u7b26\u53f7\u6574\u6570\u7684\u6240\u6709\u4f4d\u90fd\u7528\u6765\u8868\u793a\u6570\u503c\uff0c\u6ca1\u6709\u7b26\u53f7\u4f4d\uff0c\u4e5f\u5c31\u6ca1\u6709\u8d1f\u6570\uff0c\u90fd\u662f\u6b63\u6570<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5bf9\u4e8e\u4e00\u4e2an\u4f4d\u7684\u65e0\u7b26\u53f7\u6574\u6570\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u6700\u5927\u503c\uff1a2<sup>n <\/sup> -1   \u4f8b\u5982\uff1auint8\u7684\u6700\u5927\u503c\u4e3a255<\/li>\n\n\n\n<li>\u6700\u5c0f\u503c\uff1a0          \u4f8b\u5982\uff1auint8\u7684\u6700\u5c0f\u503c0<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd8\u6709\u4e24\u79cd\u7c7b\u578bint\u548cuint\uff0c\u5728\u4f7f\u7528int \u548cuint \u7c7b\u578b\u65f6\uff0c\u4e0d\u80fd\u5047\u5b9a\u5b83\u662f32 \u4f4d\u621664 \u4f4d\u7684\u6574\u578b\uff0c\u800c\u662f\u8003\u8651int \u548cuint \u53ef\u80fd\u5728\u4e0d\u540c\u5e73\u53f0\u4e0a\u7684\u5dee\u5f02<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b9e\u9645\u4f7f\u7528\u4e2d\uff0c \u5207\u7247\u6216map \u7684\u5143\u7d20\u6570\u91cf\u7b49\u90fd\u53ef\u4ee5\u7528int \u6765\u8868\u793a\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728\u4e8c\u8fdb\u5236\u4f20\u8f93\u3001\u8bfb\u5199\u6587\u4ef6\u7684\u7ed3\u6784\u63cf\u8ff0\u65f6\uff0c \u4e3a\u4e86\u4fdd\u6301\u6587\u4ef6\u7684\u7ed3\u6784\u4e0d\u4f1a\u53d7\u5230\u4e0d\u540c\u7f16\u8bd1\u76ee\u6807\u5e73\u53f0\u5b57\u8282\u957f\u5ea6\u7684\u5f71\u54cd\uff0c\u4e0d\u8981\u4f7f\u7528int \u548cuint<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd8\u6709\u4e00\u79cd\u65e0\u7b26\u53f7\u6574\u6570uintptr\uff0c\u5927\u5c0f\u5e76\u4e0d\u660e\u786e\uff0c\u4f46\u662f\u8db3\u53ef\u4ee5\u5b58\u653e\u6307\u9488\uff0cuintptr\u8fd1\u7528\u4e8e\u5e95\u5c42\u7f16\u7a0b\uff0c\u4f8b\u5982Go\u7a0b\u5e8f\u4e0eC\u7a0b\u5e8f\u6216\u64cd\u4f5c\u7cfb\u7edf\u63a5\u53e3\u754c\u9762<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\"><strong>\u4e8c\u3001\u6d6e\u70b9\u578b\uff1a<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Go \u8bed\u8a00\u652f\u6301\u4e24\u79cd\u6d6e\u70b9\u578b\u6570\uff1a float32 \u548cfloat64<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>float32 \u7684\u6d6e\u70b9\u6570\u7684\u6700\u5927\u8303\u56f4\u7ea6\u4e3a3.4e38 \uff0c\u53ef\u4ee5\u4f7f\u7528\u5e38\u91cf\u5b9a\u4e49\uff1a math.MaxFloat32<\/li>\n\n\n\n<li>float64 \u7684\u6d6e\u70b9\u6570\u7684\u6700\u5927\u8303\u56f4\u7ea6\u4e3al.8e308 \uff0c\u53ef\u4ee5\u4f7f\u7528\u4e00\u4e2a\u5e38\u91cf\u5b9a\u4e49\uff1a math.MaxF!oat64 \u3002<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u6253\u5370\u6d6e\u70b9\u6570\u65f6\uff0c\u53ef\u4ee5\u4f7f\u7528fmt \u5305\u914d\u5408\u52a8\u8bcd\u201c %f\u201d\uff0c\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"557\" height=\"257\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/12\/28.png\" alt=\"\" class=\"wp-image-2769\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/12\/28.png 557w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/12\/28-300x138.png 300w\" sizes=\"auto, (max-width: 557px) 100vw, 557px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd0\u884c\u7ed3\u679c\u5982\u56fe\u6240\u793a\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"530\" height=\"131\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/12\/29.png\" alt=\"\" class=\"wp-image-2770\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/12\/29.png 530w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/12\/29-300x74.png 300w\" sizes=\"auto, (max-width: 530px) 100vw, 530px\" \/><\/figure>\n\n\n\n<p class=\"has-luminous-vivid-amber-background-color has-background wp-block-paragraph\">\u5728\u5927\u591a\u6570\u73b0\u4ee3\u8ba1\u7b97\u673a\u4e2d\uff0c\u63a8\u8350\u4f7f\u7528float64<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">1\u3001\u4e0b\u9762\u4f8b\u5b50\u901a\u8fc7\u7b2c\u4e09\u65b9\u5de5\u5177\u5305decimal\u5b9e\u73b0float\u56db\u820d\u4e94\u5165\uff0c\u5982\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"709\" height=\"409\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/10\/7-3.png\" alt=\"\" class=\"wp-image-10420\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/10\/7-3.png 709w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/10\/7-3-300x173.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/10\/7-3-600x346.png 600w\" sizes=\"auto, (max-width: 709px) 100vw, 709px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd0\u884c\u7ed3\u679c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"709\" height=\"132\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/10\/8-2.png\" alt=\"\" class=\"wp-image-10422\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/10\/8-2.png 709w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/10\/8-2-300x56.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/10\/8-2-600x112.png 600w\" sizes=\"auto, (max-width: 709px) 100vw, 709px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">2\u3001\u6d6e\u70b9\u6570\u7cbe\u5ea6\u503c\uff0c\u5b9a\u4e49\u6d6e\u70b9\u6570\uff0c\u8f93\u51fa\u6253\u5370\uff0c\u5982\u56fe\uff1a<\/p>\n\n\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\"><strong>\u4e09\u3001\u5e03\u5c14\u578b\uff1a<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5e03\u5c14\u578b\u6570\u636e\u5728Go \u8bed\u8a00\u4e2d\u4ee5bool \u7c7b\u578b\u8fdb\u884c\u58f0\u660e\uff0c\u5e03\u5c14\u578b\u6570\u636e\u53ea\u6709true( \u771f\uff09\u548cfalse(\u5047)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5982\u679c\u6ca1\u6709\u7ed9\u5e03\u5c14\u53d8\u91cf\u8d4b\u503c\uff0c\u5b83\u5c06\u9ed8\u8ba4\u4e3afalse\uff0c\u4e5f\u53ef\u4ee5\u518d\u6b21\u5bf9\u5176\u8fdb\u884c\u8d4b\u503c\uff0c\u5982\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"534\" height=\"224\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/19-2.png\" alt=\"\" class=\"wp-image-3179\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/19-2.png 534w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/19-2-300x126.png 300w\" sizes=\"auto, (max-width: 534px) 100vw, 534px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Go \u8bed\u8a00\u4e2d\u4e0d\u5141\u8bb8\u5c06\u6574\u578b\u5f3a\u5236\u8f6c\u6362\u4e3a\u5e03\u5c14\u578b\uff0c\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"569\" height=\"220\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/12\/30-1.png\" alt=\"\" class=\"wp-image-2772\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/12\/30-1.png 569w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/12\/30-1-300x116.png 300w\" sizes=\"auto, (max-width: 569px) 100vw, 569px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u901a\u8fc7go  build\u7f16\u8bd1\u7684\u65f6\u5019\u62a5\u9519\uff0c\u5982\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"566\" height=\"159\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/12\/1-27.png\" alt=\"\" class=\"wp-image-2773\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/12\/1-27.png 566w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/12\/1-27-300x84.png 300w\" sizes=\"auto, (max-width: 566px) 100vw, 566px\" \/><\/figure>\n\n\n\n<p class=\"has-luminous-vivid-amber-background-color has-background wp-block-paragraph\">\u5e03\u5c14\u578b\u65e0\u6cd5\u53c2\u4e0e\u6570\u503c\u8fd0\u7b97\uff0c\u4e5f\u65e0\u6cd5\u4e0e\u5176\u4ed6\u7c7b\u578b\u8fdb\u884c\u8f6c\u6362\u3002<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\"><strong>\u56db\u3001\u5b57\u7b26\u4e32<\/strong>\uff1a<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">\u5728Go \u8bed\u8a00\u4e2d\u4ee5\u539f\u751f\u6570\u636e\u7c7b\u578b\u51fa\u73b0\uff0c\u4f7f\u7528\u5b57\u7b26\u4e32\u5c31\u50cf\u4f7f\u7528\u5176\u4ed6\u539f\u751f\u6570\u636e\u7c7b\u578b\uff08int\u3001bool\u3001float32 \u3001float64)\u4e00\u6837\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b57\u7b26\u4e32\u7684\u503c\u4e3a\u53cc\u5f15\u53f7\u4e2d\u7684\u5185\u5bb9\uff0c\u53ef\u4ee5\u5728Go \u8bed\u8a00\u7684\u6e90\u7801\u4e2d\u76f4\u63a5\u6dfb\u52a0\u975eASCII \u7801\u5b57\u7b26\uff0c\u4f8b\u5982\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>str := \"hello world\"\nch :\uff1d \"\u4e2d\u6587\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>1\u3001\u5b57\u7b26\u4e32\u8f6c\u4e49\u7b26\uff1a<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">  Go \u8bed\u8a00\u7684\u5b57\u7b26\u4e32\u5e38\u89c1\u8f6c\u4e49\u7b26\u5305\u542b\u56de\u8f66\u3001\u6362\u884c\u3001\u5355\u53cc\u5f15\u53f7\u3001\u5236\u8868\u7b26\u7b49\uff0c\u5982\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td class=\"has-text-align-center\" data-align=\"center\">\u8f6c\u4e49\u7b26<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u542b\u4e49<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">\\r<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u56de\u8f66\u7b26\uff08\u8fd4\u56de\u884c\u9996\u3009<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">\\n<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u6362\u884c\u7b26\uff08\u76f4\u63a5\u8df3\u5230\u4e0b\u4e00\u884c\u7684\u540c\u5217\u4f4d\u7f6e\uff09<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">\\t<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u5236\u8868\u7b26<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">\\&#8217;<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u5355\u5f15\u53f7<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">\\&#8221;<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u53cc\u5f15\u53f7<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">\\\\<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u53cd\u659c\u6760<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f8b\u5982\uff1a\u4e0b\u9762\u4f7f\u7528\u8f6c\u4e49\u5b57\u7b26\u7684\u4f8b\u5b50\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"551\" height=\"195\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/12\/16.png\" alt=\"\" class=\"wp-image-2777\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/12\/16.png 551w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/12\/16-300x106.png 300w\" sizes=\"auto, (max-width: 551px) 100vw, 551px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u6253\u5370\u540e\u7684\u7ed3\u679c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"549\" height=\"148\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/12\/17.png\" alt=\"\" class=\"wp-image-2778\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/12\/17.png 549w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/12\/17-300x81.png 300w\" sizes=\"auto, (max-width: 549px) 100vw, 549px\" \/><\/figure>\n\n\n\n<p class=\"has-luminous-vivid-amber-background-color has-background wp-block-paragraph\">\u8fd9\u6bb5\u4ee3\u7801\u4e2d\u5c06\u53cc\u5f15\u53f7\u548c\u53cd\u659c\u6760&#8221;\\&#8221;\u8fdb\u884c\u8f6c\u4e49\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>2\u3001\u5b9a\u4e49\u591a\u884c\u5b57\u7b26\u4e32<\/strong>\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728\u6e90\u7801\u4e2d\uff0c\u5c06\u5b57\u7b26\u4e32\u7684\u503c\u4ee5\u53cc\u5f15\u53f7\u4e66\u5199\u7684\u65b9\u5f0f\u662f\u5b57\u7b26\u4e32\u7684\u5e38\u89c1\u8868\u8fbe\u65b9\u5f0f\uff0c\u88ab\u79f0\u4e3a\u5b57\u7b26\u4e32\u5b57\u9762\u91cf\uff08 string literal \uff09\u3002\u8fd9\u79cd\u53cc\u5f15\u53f7\u5b57\u9762\u91cf\u4e0d\u80fd\u8de8\u884c\u3002\u5982\u679c\u9700\u8981\u5728\u6e90\u7801\u4e2d\u5d4c\u5165\u4e00\u4e2a\u591a\u884c\u5b57\u7b26\u4e32\u65f6\uff0c\u5c31\u5fc5\u987b\u4f7f\u7528&#8221;`&#8221;\u5b57\u7b26\uff0c\u4ee3\u7801\u5982\u4e0b:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"553\" height=\"258\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/12\/18.png\" alt=\"\" class=\"wp-image-2780\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/12\/18.png 553w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/12\/18-300x140.png 300w\" sizes=\"auto, (max-width: 553px) 100vw, 553px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u6253\u5370\u540e\u7684\u8f93\u51fa\u7ed3\u679c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"519\" height=\"166\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/12\/19.png\" alt=\"\" class=\"wp-image-2781\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/12\/19.png 519w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/12\/19-300x96.png 300w\" sizes=\"auto, (max-width: 519px) 100vw, 519px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u6ce8\u610f\uff1a&#8221;`&#8221;\u79f0\u4e3a\u53cd\u5f15\u53f7\uff0c\u5c31\u662f\u952e\u76d8\u4e0al \u952e\u5de6\u8fb9\u7684\u952e\uff0c\u4e24\u4e2a\u53cd\u5f15\u53f7\u95f4\u7684\u5b57\u7b26\u4e32\u5c06\u88ab\u539f\u6837\u8d4b\u503c\u5230str\u53d8\u91cf\u4e2d\u3002\u5728\u8fd9\u79cd\u65b9\u5f0f\u4e0b\uff0c\u53cd\u5f15\u53f7\u95f4\u6362\u884c\u5c06\u88ab\u4f5c\u4e3a\u5b57\u7b26\u4e32\u4e2d\u7684\u6362\u884c\uff0c\u4f46\u662f\u6240\u6709\u7684\u8f6c\u4e49\u5b57\u7b26\u5747\u65e0\u6548\uff0c\u6587\u672c\u5c06\u4f1a\u539f\u6837\u8f93\u51fa\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u591a\u884c\u5b57\u7b26\u4e32\u4e00\u822c\u7528\u4e8e\u5185\u5d4c\u6e90\u7801\u548c\u5185\u5d4c\u6570\u636e\u7b49<\/p>\n\n\n\n<p class=\"has-luminous-vivid-amber-background-color has-background wp-block-paragraph\">\u5b57\u7b26\u4e32\u53d8\u91cf\u53ef\u4ee5\u4e3a\u7a7a\uff0c\u521b\u5efa\u5b57\u7b26\u4e32\u53d8\u91cf\u540e\uff0c\u53ef\u4ee5\u5c06\u5176\u4e0e\u5176\u4ed6\u6570\u636e\u76f8\u52a0\uff0c\u4f46\u662f\u4e0d\u80fd\u4fee\u6539\u539f\u6765\u7684\u503c\uff0c\u4e0d\u80fd\u5bf9\u5b57\u7b26\u4e32\u6267\u884c\u6570\u5b66\u8fd0\u7b97\uff0c\u8981\u60f3\u5bf9\u770b\u8d77\u6765\u50cf\u6570\u5b57\u7684\u5b57\u7b26\u4e32\u6267\u884c\u6570\u5b66\u8fd0\u7b97\uff0c\u5fc5\u987b\u5148\u5c06\u5176\u8f6c\u6362\u4e3a\u6570\u5b57\u7c7b\u578b<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">go\u8bed\u8a00\u4e2d\u7684\u5b57\u7b26\u4e32\u5b9e\u9645\u4e0a\u662f\u7c7b\u578b\u4e3abyte\u7684\u53ea\u8bfb\u5207\u7247\u3002\u6216\u8005\u8bf4\u4e00\u4e2a\u5b57\u7b26\u4e32\u5c31\u662f\u4e00\u5806\u5b57\u8282\uff0c\u56e0\u6b64\u901a\u8fc7range\u904d\u5386\u7684\u65f6\u5019\uff0c\u904d\u5386\u540e\u663e\u793a\u7684\u90fd\u662f\u5bf9\u5e94\u7684\u5b57\u8282\uff0c\u56e0\u6b64\u9700\u8981\u901a\u8fc7string()\u8fdb\u884c\u8f6c\u6362<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\"><strong>\u4e94\u3001\u5b57\u7b26\uff1a<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b57\u7b26\u4e32\u4e2d\u7684\u6bcf\u4e00\u4e2a\u5143\u7d20\u53eb\u505a\u201c \u5b57\u7b26\u201d \u3002\u5728\u904d\u5386\u6216\u8005\u5355\u4e2a\u83b7\u53d6\u5b57\u7b26\u4e32\u5143\u7d20\u65f6\u53ef\u4ee5\u83b7\u5f97\u5b57\u7b26\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Go \u8bed\u8a00\u7684\u5b57\u7b26\u6709\u4ee5\u4e0b\u4e24\u79cd\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u4e00\u79cd\u662fuint8 \u7c7b\u578b\uff0c \u6216\u8005\u53ebbyte \u578b\uff0c \u7528\u4e8e\u5b58\u653e\u5360 1 \u5b57\u8282\u7684 ASCII \u5b57\u7b26\uff0c\u5982\u82f1\u6587\u5b57\u7b26\uff0c\u8fd4\u56de\u7684\u662f\u5b57\u7b26\u539f\u59cb\u5b57\u8282<\/li>\n\n\n\n<li>\u53e6\u4e00\u79cd\u662frune \u7c7b\u578b\uff0c\u4ee3\u8868\u4e00\u4e2aUTF-8 \u5b57\u7b26\u3002\u5f53\u9700\u8981\u5904\u7406\u4e2d\u6587\u3001\u65e5\u6587\u6216\u8005\u5176\u4ed6\u590d\u5408\u5b57\u7b26\u65f6\uff0c \u5219\u9700\u8981\u7528\u5230rune \u7c7b\u578b\u3002rune \u7c7b\u578b\u5b9e\u9645\u662f\u4e00\u4e2aint32<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f7f\u7528fmt.Printf \u4e2d\u7684\u201c % T \u201d \u52a8\u8bcd\u53ef\u4ee5\u8f93\u51fa\u53d8\u91cf\u7684\u5b9e\u9645\u7c7b\u578b\uff0c\u4f7f\u7528\u8fd9\u4e2a\u65b9\u6cd5\u53ef\u4ee5\u67e5\u770bbyte\u548crune \u7684\u672c\u6765\u7c7b\u578b\uff0c\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"550\" height=\"233\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/12\/1-28.png\" alt=\"\" class=\"wp-image-2782\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/12\/1-28.png 550w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/12\/1-28-300x127.png 300w\" sizes=\"auto, (max-width: 550px) 100vw, 550px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u6253\u5370\u7ed3\u679c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"547\" height=\"152\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/12\/2-20.png\" alt=\"\" class=\"wp-image-2783\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/12\/2-20.png 547w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/12\/2-20-300x83.png 300w\" sizes=\"auto, (max-width: 547px) 100vw, 547px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u53ef\u4ee5\u53d1\u73b0\uff0c byte \u7c7b\u578b\u7684a \u53d8\u91cf\uff0c\u5b9e\u9645\u7c7b\u578b\u662fuint8 \uff0c\u5176\u503c\u4e3a&#8217;a&#8217;\uff0c\u5bf9\u5e94\u7684ASCII \u7f16\u7801\u4e3a97\uff0crune \u7c7b\u578b\u7684b \u53d8\u91cf\u7684\u5b9e\u9645\u7c7b\u578b\u662fint3 2 \uff0c\u5bf9\u5e94\u7684Unicode \u7801\u5c31\u662f20320 \u3002<\/p>\n\n\n\n<p class=\"has-luminous-vivid-amber-background-color has-background wp-block-paragraph\">uint8\u548cbyte\u662f\u4e00\u6837\u7684\uff0c\u53ef\u4ee5\u7406\u89e3\u4e3a\u5b83\u4eec\u662f\u4e00\u4e2a\uff0cbyte\u4e3auint8\u7684\u522b\u540d<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Go \u4f7f\u7528\u4e86\u7279\u6b8a\u7684rune \u7c7b\u578b\u6765\u5904\u7406Unicode \uff0c\u8ba9\u57fa\u4e8eUnicode \u7684\u6587\u672c\u5904\u7406\u66f4\u4e3a\u65b9\u4fbf\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528byte \u578b\u8fdb\u884c\u9ed8\u8ba4\u5b57\u7b26\u4e32\u5904\u7406\uff0c\u6027\u80fd\u548c\u6269\u5c55\u6027\u90fd\u6709\u7167\u987e\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">UTF-8 \u548cUnicode \u6709\u4f55\u533a\u522b\uff1f<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0b\u9762\u4f8b\u5b50\u7528\u6765\u8ba1\u7b97\u5b57\u7b26\u4e32\u957f\u5ea6\uff0c\u5982\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"804\" height=\"299\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/03\/8-2.png\" alt=\"\" class=\"wp-image-7548\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/03\/8-2.png 804w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/03\/8-2-300x112.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/03\/8-2-768x286.png 768w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/03\/8-2-600x223.png 600w\" sizes=\"auto, (max-width: 804px) 100vw, 804px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"841\" height=\"86\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/03\/95.png\" alt=\"\" class=\"wp-image-7550\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/03\/95.png 841w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/03\/95-300x31.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/03\/95-768x79.png 768w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/03\/95-600x61.png 600w\" sizes=\"auto, (max-width: 841px) 100vw, 841px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0a\u56fe\u4e2d\u7684\u7b2c\u4e00\u884c\u6253\u5370\u7684\u5b9e\u9645\u662f\u5e95\u5c42\u5b57\u8282\u7684\u957f\u5ea6\uff0c\u5176\u4e2d\uff0c\u6c49\u5b57\u5728UTF-8\u4e2d\u5360\u75283\u4e2a\u5b57\u8282\uff0c\u5728unicode\u4e2d\u5360\u75282\u4e2a\u5b57\u8282\uff0cgo\u8bed\u8a00\u9ed8\u8ba4\u4e3autf-8\u7f16\u7801\u89c4\u5219\uff0c\u56e0\u6b64\u6253\u5370\u7684\u7ed3\u679c\u5c06\u662f12\uff0c\u7b2c\u4e8c\u884c\u901a\u8fc7rune\uff0c\u5b9e\u9645\u83b7\u53d6\u7684\u662f\u5b9e\u9645\u5b57\u7b26\u4e32\u7684\u957f\u5ea6\uff0c\u4e0d\u662f\u5e95\u5c42\u5b57\u8282\u7684\u957f\u5ea6\uff0c\u56e0\u6b64\u4e3a8\uff0c\u56e0\u6b64\u8981\u60f3\u83b7\u53d6\u5b9e\u9645\u5b57\u7b26\u4e32\u7684\u957f\u5ea6\u800c\u4e0d\u662f\u5e95\u5c42\u5b57\u8282\u7684\u957f\u5ea6\uff0c\u53ef\u4ee5\u4f7f\u7528rune\u7c7b\u578b<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Unicode \u662f\u5b57\u7b26\u96c6\u3002ASCII \u4e5f\u662f\u4e00\u79cd\u5b57\u7b26\u96c6\u3002\n\u5b57\u7b26\u96c6\u4e3a\u6bcf\u4e2a\u5b57\u7b26\u5206\u914d\u4e00\u4e2a\u552f\u4e00\u7684ID \uff0c\u6211\u4eec\u4f7f\u7528\u5230\u7684\u6240\u6709\u5b57\u7b26\u5728U nicode \u5b57\u7b26\u96c6\u4e2d\u90fd\u6709\u552f\u4e00\u7684\u4e00\u4e2aID \u5bf9\u5e94\uff0c\u4f8b\u5982\u4e0a\u9762\u4f8b\u5b50\u4e2d\u7684a\u5728Unicode \u4e0eASCII \u4e2d\u7684\u7f16\u7801\u90fd\u662f97 \u3002\u201c\u4f60\u201d\u5728Unicode \u4e2d\u7684\u7f16\u7801\u4e3a20320 \uff0c \u4f46\u662f\u5728\u4e0d\u540c\u56fd\u5bb6\u7684\u5b57\u7b26\u96c6\u4e2d\uff0c\u201c\u4f60\u201d(\u4e2d\u6587)\u7684ID\u4f1a\u4e0d\u540c\u3002\u800c\u65e0\u8bba\n\u4efb\u4f55\u60c5\u51b5\u4e0b\uff0c Unicode \u4e2d\u7684\u5b57\u7b26\u7684ID \u90fd\u662f\u4e0d\u4f1a\u53d8\u5316\u7684\u3002\nUTF-8 \u662f\u7f16\u7801\u89c4\u5219\uff0c\u5c06Unicode \u4e2d\u5b57\u7b26\u7684ID\u4ee5\u67d0\u79cd\u65b9\u5f0f\u8fdb\u884c\u7f16\u7801\u3002UTF-8 \u7684\u662f\u4e00\u79cd\u53d8\u957f\u7f16\u7801\u89c4\u5219\uff0c\u4ece1\u52304\u4e2a\u5b57\u8282\u4e0d\u7b49\u3002\u7f16\u7801\u89c4\u5219\u5982\u4e0b\uff1a\n1\u3001Oxxxxxx \u8868\u793a\u6587\u5b57\u7b26\u53f7\u3002\uff5e 127 \uff0c \u517c\u5bb9ASCII \u5b57\u7b26\u96c6\u3002\n2\u3001\u4ece128 \u5230OxlOffff \u8868\u793a\u5176\u4ed6\u5b57\u7b26\u3002\n\u6839\u636e\u8fd9\u4e2a\u89c4\u5219\uff0c\u62c9\u4e01\u6587\u8bed\u7cfb\u7684\u5b57\u7b26\u7f16\u7801\u4e00\u822c\u60c5\u51b5\u4e0b\uff0c\u6bcf\u4e2a\u5b57\u7b26\u4f9d\u7136\u5360\u7528\u4e00\u4e2a\u5b57\u8282\uff0c\u800c\u4e2d\u6587\u6bcf\u4e2a\u5b57\u7b26\u5360\u75283\u4e2a\u5b57\u8282\u3002\n\u5e7f\u4e49\u7684Unicode \u6307\u4e00\u4e2a\u6807\u51c6\uff0c\u5b9a\u4e49\u5b57\u7b26\u96c6\u53ca\u7f16\u7801\u89c4\u5219\uff0c\u5373Unicode \u5b57\u7b26\u96c6\u548cUTF-8 \u3001UTF-16 \u7f16\u7801\u7b49\u3002<\/code><\/pre>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\"><strong>\u516d\uff1a\u5207\u7247<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5207\u7247\u662f\u4e00\u4e2a\u62e5\u6709\u76f8\u540c\u7c7b\u578b\u5143\u7d20\u7684\u53ef\u53d8\u957f\u5ea6\u7684\u5e8f\u5217\u3002\u5207\u7247\u7684\u58f0\u660e\u65b9\u5f0f\u5982\u4e0b\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>var name [] T<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5176\u4e2d\uff0c T \u4ee3\u8868\u5207\u7247\u5143\u7d20\u7c7b\u578b\uff0c\u53ef\u4ee5\u662f\u6574\u578b\u3001\u6d6e\u70b9\u578b\u3001\u5e03\u5c14\u578b\u3001\u5207\u7247\u3001map\u3001\u51fd\u6570\u7b49\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5207\u7247\u7684\u5143\u7d20\u4f7f\u7528&#8221;[]&#8221;\u8fdb\u884c\u8bbf\u95ee\uff0c\u5728\u65b9\u62ec\u53f7\u4e2d\u63d0\u4f9b\u5207\u7247\u7684\u7d22\u5f15\u5373\u53ef\u8bbf\u95ee\u5143\u7d20\uff0c\u7d22\u5f15\u7684\u8303\u56f4\u4ece0\u5f00\u59cb\uff0c\u4e14\u4e0d\u8d85\u8fc7\u5207\u7247\u7684\u6700\u5927\u5bb9\u91cf\u3002\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>a := make(&#91;]int , 3)\na&#91;0] = 1\na&#91;1] = 2\na&#91;3] = 5<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u8bf4\u660e\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u7b2c1 \u884c\uff0c\u521b\u5efa\u4e00\u4e2a\u5bb9\u91cf\u4e3a3 \u7684\u6574\u578b\u5207\u7247\u3002<\/li>\n\n\n\n<li>\u7b2c3 \uff5e 5 \u884c\uff0c\u4e3a\u5207\u7247\u5143\u7d20\u8d4b\u503c\u3002<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u5207\u7247\u8fd8\u53ef\u4ee5\u5728\u5176\u5143\u7d20\u96c6\u5408\u5185\u8fde\u7eed\u5730\u9009\u53d6\u4e00\u6bb5\u533a\u57df\u4f5c\u4e3a\u65b0\u7684\u5207\u7247\uff0c \u5c31\u50cf\u5176\u540d\u5b57&#8221;\u5207\u7247&#8221;\u4e00\u6837\uff0c\u5207\u51fa\u4e00\u5757\u533a\u57df\uff0c\u5f62\u6210\u65b0\u7684\u5207\u7247\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b57\u7b26\u4e32\u4e5f\u53ef\u4ee5\u6309\u5207\u7247\u7684\u65b9\u5f0f\u8fdb\u884c\u64cd\u4f5c\uff0c\u770b\u4e0b\u9762\u7684\u4f8b\u5b50\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>str := \"hello world\"\nfmt.Println(str&#91;6:])\n\u8f93\u51fa\u7ed3\u679c\u5982\u4e0b\uff1aworld<\/code><\/pre>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\"><strong>\u4e03\u3001\u7c7b\u578b\u8f6c\u6362<\/strong>\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Go\u6807\u51c6\u5e93\u63d0\u4f9b\u4e86\u826f\u597d\u7684\u7c7b\u578b\u8f6c\u6362\u652f\u6301\uff0cstrconv\u5305\u63d0\u4f9b\u4e86\u4e00\u6574\u5957\u7c7b\u578b\u8f6c\u6362\u65b9\u6cd5\uff0c\u53ef\u7528\u4e8e\u8f6c\u6362\u4e3a\u5b57\u7b26\u4e32\u6216\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u5176\u4ed6\u7c7b\u578b<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f8b\u5982\uff1a\u5b9a\u4e49\u5e03\u5c14\u53d8\u91cfb\uff0c\u503c\u4e3atrue\uff0c\u5c06\u5176\u8f6c\u4e3a\u5b57\u7b26\u4e32\u7c7b\u578b\uff0c\u5982\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"553\" height=\"300\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/20-2.png\" alt=\"\" class=\"wp-image-3183\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/20-2.png 553w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/20-2-300x163.png 300w\" sizes=\"auto, (max-width: 553px) 100vw, 553px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u5e03\u5c14\u7c7b\u578b\uff0c\u5982\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"516\" height=\"302\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/21-2.png\" alt=\"\" class=\"wp-image-3184\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/21-2.png 516w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/21-2-300x176.png 300w\" sizes=\"auto, (max-width: 516px) 100vw, 516px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">1\u3001\u5c06\u5b57\u7b26\u4e32\u8f6c\u4e3aint\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>int,err := strconv.Atoi(string)<\/code><\/pre>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\"><strong>\u516b\u3001\u6307\u9488\uff1a<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Go\u8bed\u8a00\u4e2d\u7684\u51fd\u6570\u4f20\u53c2\u90fd\u662f\u503c\u62f7\u8d1d\uff0c\u5f53\u6211\u4eec\u60f3\u8981\u4fee\u6539\u67d0\u4e2a\u53d8\u91cf\u7684\u65f6\u5019\uff0c\u6211\u4eec\u53ef\u4ee5\u521b\u5efa\u4e00\u4e2a\u6307\u5411\u8be5\u53d8\u91cf\u5730\u5740\u7684\u6307\u9488\u53d8\u91cf\u3002\u4f20\u9012\u6570\u636e\u4f7f\u7528\u6307\u9488\uff0c\u800c\u65e0\u987b\u62f7\u8d1d\u6570\u636e\uff0c\u7c7b\u578b\u6307\u9488\u4e0d\u80fd\u8fdb\u884c\u504f\u79fb\u548c\u8fd0\u7b97\u3002Go\u8bed\u8a00\u4e2d\u7684\u6307\u9488\u64cd\u4f5c\u975e\u5e38\u7b80\u5355\uff0c\u53ea\u9700\u8981\u8bb0\u4f4f\u4e24\u4e2a\u7b26\u53f7\uff1a &amp; \uff08\u53d6\u5730\u5740\uff09\u548c * \uff08\u6839\u636e\u5730\u5740\u53d6\u503c\uff09\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Go \u8bed\u8a00\u7684\u6307\u9488\u7c7b\u578b\u53d8\u91cf\u62e5\u6709\u6307\u9488\u7684\u9ad8\u6548\u8bbf\u95ee\uff0c\u4f46\u53c8\u4e0d\u4f1a\u53d1\u751f\u6307\u9488\u504f\u79fb\uff0c\u4ece\u800c\u907f\u514d\u975e\u6cd5\u4fee\u6539\u5173\u952e\u6027\u6570\u636e\u95ee\u9898\u3002\u540c\u65f6\uff0c \u5783\u573e\u56de\u6536\u4e5f\u6bd4\u8f83\u5bb9\u6613\u5bf9\u4e0d\u4f1a\u53d1\u751f\u504f\u79fb\u7684\u6307\u9488\u8fdb\u884c\u68c0\u7d22\u548c\u56de\u6536\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5207\u7247\u6bd4\u539f\u59cb\u6307\u9488\u5177\u5907\u66f4\u5f3a\u5927\u7684\u7279\u6027\uff0c \u66f4\u4e3a\u5b89\u5168\u3002\u5207\u7247\u53d1\u751f\u8d8a\u754c\u65f6\uff0c\u8fd0\u884c\u65f6\u4f1a\u62a5\u51fa\u5ca9\u673a\uff0c\u5e76\u6253\u51fa\u5806\u6808\uff0c\u800c\u539f\u59cb\u6307\u9488\u53ea\u4f1a\u5d29\u6e83\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>1\u3001\u8ba4\u8bc6\u6307\u9488\u5730\u5740\u548c\u6307\u9488\u7c7b\u578b\uff1a<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6bcf\u4e2a\u53d8\u91cf\u5728\u8fd0\u884c\u65f6\u90fd\u62e5\u6709\u4e00\u4e2a\u5730\u5740\uff0c\u8fd9\u4e2a\u5730\u5740\u4ee3\u8868\u53d8\u91cf\u5728\u5185\u5b58\u4e2d\u7684\u4f4d\u7f6e\u3002Go \u8bed\u8a00\u4e2d\u4f7f\u7528\u201c\uff06\u201d \u64cd\u4f5c\u7b26\u653e\u5728\u53d8\u91cf\u524d\u9762\u5bf9\u53d8\u91cf\u8fdb\u884c\u201c\u53d6\u5730\u5740\u201d\u64cd\u4f5c(\u83b7\u53d6\u5185\u5b58\u5730\u5740)\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f8b\u5982\uff1a\u4e0b\u9762\u5b9a\u4e49\u53d8\u91cfa\uff0c\u6253\u5370\u53d8\u91cfa\u7684\u5185\u5b58\u5730\u5740\uff0c\u5982\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"735\" height=\"280\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/11\/3-2.png\" alt=\"\" class=\"wp-image-5367\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/11\/3-2.png 735w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/11\/3-2-300x114.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/11\/3-2-600x229.png 600w\" sizes=\"auto, (max-width: 735px) 100vw, 735px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ee3\u7801\u6267\u884c\u7ed3\u679c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"693\" height=\"208\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/11\/4-1.png\" alt=\"\" class=\"wp-image-5369\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/11\/4-1.png 693w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/11\/4-1-300x90.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/11\/4-1-600x180.png 600w\" sizes=\"auto, (max-width: 693px) 100vw, 693px\" \/><\/figure>\n\n\n\n<p class=\"has-luminous-vivid-amber-background-color has-background wp-block-paragraph\">\u53d8\u91cf\u3001\u6307\u9488\u548c\u5730\u5740\u4e8c\u8005\u7684\u5173\u7cfb\u662f\uff1a \u6bcf\u4e2a\u53d8\u91cf\u90fd\u62e5\u6709\u5730\u5740\uff0c\u6307\u9488\u7684\u503c\u5c31\u662f\u5730\u5740\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>2\u3001\u4ece\u6307\u9488\u83b7\u53d6\u6307\u9488\u6307\u5411\u7684\u503c\uff1a<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5bf9\u666e\u901a\u53d8\u91cf\u4f7f\u7528\u201c\uff06\u201d\u64cd\u4f5c\u7b26\u53d6\u5730\u5740\u83b7\u5f97\u8fd9\u4e2a\u53d8\u91cf\u7684\u6307\u9488\u540e\uff0c\u53ef\u4ee5\u5bf9\u6307\u9488\u4f7f\u7528\u201c\uff0a\u201d\u64cd\u4f5c\uff0c\u4e5f\u5c31\u662f\u83b7\u53d6\u6307\u9488\u7684\u5b9e\u9645\u5730\u5740<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f8b\u5982\uff1a\u4e0b\u9762\u5c06\u53d8\u91cfa\u7684\u5185\u5b58\u5730\u5740\u8d4b\u503c\u7ed9\u53d8\u91cfb,\u5e76\u83b7\u53d6\u5185\u5b58\u5730\u5740\u7684\u5b9e\u9645\u503c\uff0c\u5982\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"777\" height=\"334\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/11\/5-1.png\" alt=\"\" class=\"wp-image-5370\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/11\/5-1.png 777w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/11\/5-1-300x129.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/11\/5-1-768x330.png 768w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/11\/5-1-600x258.png 600w\" sizes=\"auto, (max-width: 777px) 100vw, 777px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u53d6\u5730\u5740\u64cd\u4f5c\u7b26\u201c\uff06\u201d\u548c\u53d6\u503c\u64cd\u4f5c\u7b26\u201c\uff0a\u201d\u662f\u4e00\u5bf9\u4e92\u8865\u64cd\u4f5c\u7b26\uff0c \u201c\uff06\u201d\u53d6\u51fa\u5730\u5740\uff0c &#8220;*&#8221;\u6839\u636e\u5730\u5740\u53d6\u51fa\u5730\u5740\u6307\u5411\u7684\u503c\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u53d8\u91cf\u3001\u6307\u9488\u5730\u5740\u3001\u6307\u9488\u53d8\u91cf\u3001\u53d6\u5730\u5740\u3001\u53d6\u503c\u7684\u76f8\u4e92\u5173\u7cfb\u548c\u7279\u6027\u5982\u4e0b\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5bf9\u53d8\u91cf\u8fdb\u884c\u53d6\u5730\u5740\uff08\uff06\uff09\u64cd\u4f5c\uff0c\u53ef\u4ee5\u83b7\u5f97\u8fd9\u4e2a\u53d8\u91cf\u7684\u6307\u9488\u53d8\u91cf\u3002<\/li>\n\n\n\n<li>\u6307\u9488\u53d8\u91cf\u7684\u503c\u662f\u6307\u9488\u5730\u5740\u3002<\/li>\n\n\n\n<li>\u5bf9\u6307\u9488\u53d8\u91cf\u8fdb\u884c\u53d6\u503c\uff08\uff0a\u3009\u64cd\u4f5c\uff0c\u53ef\u4ee5\u83b7\u5f97\u6307\u9488\u53d8\u91cf\u6307\u5411\u7684\u539f\u53d8\u91cf\u7684\u503c\u3002<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>3\u3001\u4f7f\u7528\u6307\u9488\u4fee\u6539\u503c\uff1a<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u901a\u8fc7\u6307\u9488\u4e0d\u4ec5\u53ef\u4ee5\u53d6\u503c\uff0c\u4e5f\u53ef\u4ee5\u4fee\u6539\u503c\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0b\u9762\u4f8b\u5b50\u4f7f\u7528\u6307\u9488\u8fdb\u884c\u6570\u503c\u4ea4\u6362\uff0c\u5982\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"737\" height=\"470\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/11\/6.png\" alt=\"\" class=\"wp-image-5374\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/11\/6.png 737w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/11\/6-300x191.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/11\/6-600x383.png 600w\" sizes=\"auto, (max-width: 737px) 100vw, 737px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ee3\u7801\u6267\u884c\u7ed3\u679c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"731\" height=\"193\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/11\/7.png\" alt=\"\" class=\"wp-image-5375\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/11\/7.png 731w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/11\/7-300x79.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/11\/7-600x158.png 600w\" sizes=\"auto, (max-width: 731px) 100vw, 731px\" \/><\/figure>\n\n\n\n<p class=\"has-luminous-vivid-amber-background-color has-background wp-block-paragraph\">\u6ce8: &#8220;*&#8221; \u64cd\u4f5c\u7b26\u4f5c\u4e3a\u53f3\u503c\u65f6(=\u53f3\u4fa7)\uff0c\u610f\u4e49\u662f\u53d6\u6307\u9488\u7684\u503c\uff0c\u4f5c\u4e3a\u5de6\u503c\u65f6\uff0c\u4e5f\u5c31\u662f\u653e\u5728\u8d4b\u503c\u64cd\u4f5c\u7b26\u7684\u5de6\u8fb9\u65f6\uff0c\u8868\u793a\u83b7\u53d6\u7684\u662fa \u6307\u5411\u7684\u53d8\u91cf\uff0c\u4e5f\u5c31\u662fx\u3002\u603b\u7ed3\u8d77\u6765\uff0c&#8221;*&#8221; \u201d\u64cd\u4f5c\u7b26\u7684\u6839\u672c\u610f\u4e49\u5c31\u662f\u64cd\u4f5c\u6307\u9488\u6307\u5411\u7684\u53d8\u91cf\uff0c\u5f53\u64cd\u4f5c\u5728\u53f3\u503c\u65f6\uff0c\u5c31\u662f\u53d6\u6307\u5411\u53d8\u91cf\u7684\u503c\uff1b\u5f53\u64cd\u4f5c\u5728\u5de6\u503c\u65f6\uff0c\u5c31\u662f\u5c06\u503c\u8bbe\u7f6e\u7ed9\u6307\u5411\u7684\u53d8\u91cf<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>4\u3001\u4f7f\u7528\u6307\u9488\u53d8\u91cf\u83b7\u53d6\u547d\u4ee4\u884c\u7684\u8f93\u5165\u4fe1\u606f\uff1a<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Go \u8bed\u8a00\u7684flag \u5305\u4e2d\uff0c\u5b9a\u4e49\u7684\u6307\u4ee4\u4ee5\u6307\u9488\u7c7b\u578b\u8fd4\u56de\uff0c\u901a\u8fc7\u5b66\u4e60flag \u5305\uff0c\u53ef\u4ee5\u6df1\u5165\u4e86\u89e3\u6307\u9488\u53d8\u91cf\u5728\u8bbe\u8ba1\u4e0a\u7684\u65b9\u4fbf\u4e4b\u5904\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0b\u9762\u7684\u4ee3\u7801\u901a\u8fc7\u63d0\u524d\u5b9a\u4e49\u4e00\u4e9b\u547d\u4ee4\u884c\u6307\u4ee4\u548c\u5bf9\u5e94\u53d8\u91cf\uff0c\u5728\u8fd0\u884c\u65f6\uff0c\u8f93\u5165\u5bf9\u5e94\u53c2\u6570\u7684\u547d\u4ee4\u884c\u53c2\u6570\u540e\uff0c\u7ecf\u8fc7flag \u5305\u7684\u89e3\u6790\u540e\u5373\u53ef\u901a\u8fc7\u5b9a\u4e49\u7684\u53d8\u91cf\u83b7\u53d6\u547d\u4ee4\u884c\u7684\u6570\u636e\uff0c\u5b9a\u4e49\u6587\u4ef6flagg.go\uff0c\u5982\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"841\" height=\"386\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/11\/8.png\" alt=\"\" class=\"wp-image-5379\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/11\/8.png 841w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/11\/8-300x138.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/11\/8-768x352.png 768w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/11\/8-600x275.png 600w\" sizes=\"auto, (max-width: 841px) 100vw, 841px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u8bf4\u660e\u5982\u4e0b\uff1a<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u901a\u8fc7flag.String\uff0c \u5b9a\u4e49\u4e00\u4e2amode \u53d8\u91cf\uff0c\u8fd9\u4e2a\u53d8\u91cf\u7684\u7c7b\u578b\u662f*string\uff0c\u540e\u97623\u4e2a\u53c2\u6570\u5206\u522b\u5982\u4e0b\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u53c2\u6570\u540d\u79f0\uff1a \u5728\u7ed9\u5e94\u7528\u8f93\u5165\u53c2\u6570\u65f6 \uff0c\u4f7f\u7528\u8fd9\u4e2a\u540d\u79f0\u3002<\/li>\n\n\n\n<li>\u53c2\u6570\u503c\u7684\u9ed8\u8ba4\u503c\uff1a\u4e0eflag \u6240\u4f7f\u7528\u7684\u51fd\u6570\u521b\u5efa\u53d8\u91cf\u7c7b\u578b\u5bf9\u5e94\uff0c String \u5bf9\u5e94\u5b57\u7b26\u4e32\u3001Int \u5bf9\u5e94\u6574\u578b\u3001Bool \u5bf9\u5e94\u5e03\u5c14\u578b\u7b49\uff0c\u4e0a\u56fe\u4e2d\u5b57\u7b26\u4e32\u7684\u9ed8\u8ba4\u503c\u4e3a\u7a7a&#8221; &#8220;<\/li>\n\n\n\n<li>\u53c2\u6570\u8bf4\u660e\uff1a\u4f7f\u7528\uff0dhelp \u65f6\uff0c\u4f1a\u51fa\u73b0\u5728\u8bf4\u660e\u4e2d,\u53ef\u81ea\u5b9a\u4e49<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u901a\u8fc7flag.Parse()\u89e3\u6790\u547d\u4ee4\u884c\u53c2\u6570\uff0c\u5e76\u5c06\u7ed3\u679c\u5199\u5165\u521b\u5efa\u7684\u6307\u4ee4\u53d8\u91cf\u4e2d\uff0c\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\u5c31\u662fmode1\u53d8\u91cf\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6700\u540e\u6253\u5370\u53d8\u91cfmode1\u7684\u503c<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u56e0\u4e3a\u8fd0\u884c\u9700\u8981\u4f20\u5165\u53c2\u6570\uff0c\u5982\u679c\u662f\u547d\u4ee4\u884c\u76f4\u63a5\u6267\u884c\u53ef\u6267\u884cgo run flagg.go &#8211;mode=gongguan\uff0c\u5982\u679c\u662fgoland\u7f16\u8f91\u5668\uff0c\u90a3\u4e48\u9700\u8981\u5148\u5728run&#8211;Edit Configurations&#8211;Program arguments\u4e2d\u914d\u7f6e\uff0c\u5982\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"760\" height=\"157\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/11\/9-1.png\" alt=\"\" class=\"wp-image-5382\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/11\/9-1.png 760w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/11\/9-1-300x62.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/11\/9-1-600x124.png 600w\" sizes=\"auto, (max-width: 760px) 100vw, 760px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u6700\u540e\u8fd0\u884c\uff0c\u8f93\u5165\u53c2\u6570\u4e3agongguan ,\u56e0\u6b64\u8f93\u51fa\u4e5f\u4e3agongguan\uff0c\u7ed3\u679c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"696\" height=\"218\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/11\/10-1.png\" alt=\"\" class=\"wp-image-5384\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/11\/10-1.png 696w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/11\/10-1-300x94.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/11\/10-1-600x188.png 600w\" sizes=\"auto, (max-width: 696px) 100vw, 696px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>5\u3001\u521b\u5efa\u6307\u9488\u7684\u53e6\u4e00\u79cd\u65b9\u6cd5-new()\u51fd\u6570\uff1a<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5148\u770b\u4e0b\u9762\u7684\u4f8b\u5b50\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"706\" height=\"222\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/01\/23.png\" alt=\"\" class=\"wp-image-6461\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/01\/23.png 706w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/01\/23-300x94.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/01\/23-600x189.png 600w\" sizes=\"auto, (max-width: 706px) 100vw, 706px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"706\" height=\"185\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/01\/24.png\" alt=\"\" class=\"wp-image-6464\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/01\/24.png 706w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/01\/24-300x79.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/01\/24-600x157.png 600w\" sizes=\"auto, (max-width: 706px) 100vw, 706px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ece\u4e0a\u56fe\u53ef\u4ee5\u770b\u5230\uff0c\u6267\u884c\u4e0a\u9762\u7684\u4ee3\u7801\u4f1a\u5f15\u53d1panic\uff0c\u56e0\u4e3a\u5728Go\u8bed\u8a00\u4e2d\u5bf9\u4e8e\u5f15\u7528\u7c7b\u578b\u7684\u53d8\u91cf\uff0c\u6211\u4eec\u5728\u4f7f\u7528\u7684\u65f6\u5019\u4e0d\u4ec5\u8981\u58f0\u660e\u5b83\uff0c\u8fd8\u8981\u4e3a\u5b83\u5206\u914d\u5185\u5b58\u7a7a\u95f4\uff0c\u5426\u5219\u6211\u4eec\u7684\u503c\u5c31\u6ca1\u529e\u6cd5\u5b58\u50a8\uff0c\u800c\u5bf9\u4e8e\u503c\u7c7b\u578b\u7684\u58f0\u660e\u4e0d\u9700\u8981\u5206\u914d\u5185\u5b58\u7a7a\u95f4\uff0c\u662f\u56e0\u4e3a\u5b83\u4eec\u5728\u58f0\u660e\u7684\u65f6\u5019\u5df2\u7ecf\u9ed8\u8ba4\u5206\u914d\u597d\u4e86\u5185\u5b58\u7a7a\u95f4\uff0c<strong>Go\u8bed\u8a00\u4e2dnew\u548cmake\u662f\u5185\u5efa\u7684\u4e24\u4e2a\u51fd\u6570\uff0c\u4e3b\u8981\u7528\u6765\u5206\u914d\u5185\u5b58<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u901a\u8fc7new()\u65b9\u6cd5\u6765\u521b\u5efa\u6307\u9488\u53d8\u91cf\uff0c\u683c\u5f0f\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"857\" height=\"326\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/11\/11-1.png\" alt=\"\" class=\"wp-image-5388\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/11\/11-1.png 857w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/11\/11-1-300x114.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/11\/11-1-768x292.png 768w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/11\/11-1-600x228.png 600w\" sizes=\"auto, (max-width: 857px) 100vw, 857px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ee3\u7801\u6267\u884c\u7ed3\u679c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"728\" height=\"227\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/11\/12-1.png\" alt=\"\" class=\"wp-image-5389\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/11\/12-1.png 728w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/11\/12-1-300x94.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/11\/12-1-600x187.png 600w\" sizes=\"auto, (max-width: 728px) 100vw, 728px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">new()\u51fd\u6570\u53ef\u4ee5\u521b\u5efa\u4e00\u4e2a\u5bf9\u5e94\u7c7b\u578b\u7684\u6307\u9488\uff0c\u521b\u5efa\u8fc7\u7a0b\u4f1a\u5206\u914d\u5185\u5b58\u3002\u88ab\u521b\u5efa\u7684\u6307\u9488\u6307\u5411\u7684\u503c\u4e3a\u9ed8\u8ba4\u503c<\/p>\n\n\n\n<p class=\"has-normal-font-size wp-block-paragraph\"><strong>6\u3001make<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">make\u4e5f\u662f\u7528\u4e8e\u5185\u5b58\u5206\u914d\u7684\uff0c\u533a\u522b\u4e8enew\uff0c\u5b83\u53ea\u7528\u4e8eslice\u3001map\u4ee5\u53cachan\u7684\u5185\u5b58\u521b\u5efa\uff0c\u800c\u4e14\u5b83\u8fd4\u56de\u7684\u7c7b\u578b\u5c31\u662f\u8fd9\u4e09\u4e2a\u7c7b\u578b\u672c\u8eab\uff0c\u800c\u4e0d\u662f\u4ed6\u4eec\u7684\u6307\u9488\u7c7b\u578b\uff0c\u56e0\u4e3a\u8fd9\u4e09\u79cd\u7c7b\u578b\u5c31\u662f\u5f15\u7528\u7c7b\u578b\uff0c\u6240\u4ee5\u5c31\u6ca1\u6709\u5fc5\u8981\u8fd4\u56de\u4ed6\u4eec\u7684\u6307\u9488\u4e86,\u5982\u4e0b\u4f7f\u7528make\u8fdb\u884c\u521d\u59cb\u5316\uff0c\u5206\u914d\u5185\u5b58\uff0c\u5982\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"708\" height=\"243\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/01\/25.png\" alt=\"\" class=\"wp-image-6469\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/01\/25.png 708w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/01\/25-300x103.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/01\/25-600x206.png 600w\" sizes=\"auto, (max-width: 708px) 100vw, 708px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"708\" height=\"114\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/01\/26.png\" alt=\"\" class=\"wp-image-6470\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/01\/26.png 708w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/01\/26-300x48.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/01\/26-600x97.png 600w\" sizes=\"auto, (max-width: 708px) 100vw, 708px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">new\u548cmake\u7684\u533a\u522b\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u4e8c\u8005\u90fd\u662f\u7528\u6765\u505a\u5185\u5b58\u5206\u914d\u7684<\/li>\n\n\n\n<li>make\u53ea\u7528\u4e8eslice\u3001map\u4ee5\u53cachannel\u7684\u521d\u59cb\u5316\uff0c\u8fd4\u56de\u7684\u8fd8\u662f\u8fd9\u4e09\u4e2a\u5f15\u7528\u7c7b\u578b\u672c\u8eab\uff1b<\/li>\n\n\n\n<li>\u800cnew\u7528\u4e8e\u7c7b\u578b\u7684\u5185\u5b58\u5206\u914d\uff0c\u5e76\u4e14\u5185\u5b58\u5bf9\u5e94\u7684\u503c\u4e3a\u7c7b\u578b\u96f6\u503c\uff0c\u8fd4\u56de\u7684\u662f\u6307\u5411\u7c7b\u578b\u7684\u6307\u9488<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">7<strong>\u3001\u7a7a\u6307\u9488\uff1a<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5f53\u4e00\u4e2a\u6307\u9488\u88ab\u5b9a\u4e49\u540e\u6ca1\u6709\u5206\u914d\u5230\u4efb\u4f55\u53d8\u91cf\u65f6\uff0c\u5b83\u7684\u503c\u4e3a nil\uff0c\u4e0b\u9762\u5b9a\u4e49\u7a7a\u6307\u9488\u5e76\u5224\u65ad\uff0c\u5982\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"709\" height=\"273\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/01\/21.png\" alt=\"\" class=\"wp-image-6458\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/01\/21.png 709w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/01\/21-300x116.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/01\/21-600x231.png 600w\" sizes=\"auto, (max-width: 709px) 100vw, 709px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"706\" height=\"110\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/01\/22.png\" alt=\"\" class=\"wp-image-6459\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/01\/22.png 706w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/01\/22-300x47.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/01\/22-600x93.png 600w\" sizes=\"auto, (max-width: 706px) 100vw, 706px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">8\u3001\u5728golang1.22\u7248\u672c\u4e4b\u524d\uff0cfor\u5faa\u73af\u4e2d\u7684\u53d8\u91cf\u5171\u7528\u4e00\u4e2a\u6307\u9488\u5730\u5740\uff0c\u4e0d\u4f1a\u521b\u5efa\u65b0\u5730\u5740\uff0c\u5982\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"693\" height=\"228\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2024\/03\/8-3.jpg\" alt=\"\" class=\"wp-image-16349\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2024\/03\/8-3.jpg 693w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2024\/03\/8-3-300x99.jpg 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2024\/03\/8-3-600x197.jpg 600w\" sizes=\"auto, (max-width: 693px) 100vw, 693px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u89e3\u51b3\u6b64\u95ee\u9898\u7684\u65b9\u6cd5\u5c31\u662f\u521b\u5efa\u4e00\u4e2a\u65b0\u53d8\u91cf\u5373\u53ef\uff0c\u5982\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"696\" height=\"231\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2024\/03\/2-4.jpg\" alt=\"\" class=\"wp-image-16351\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2024\/03\/2-4.jpg 696w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2024\/03\/2-4-300x100.jpg 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2024\/03\/2-4-600x199.jpg 600w\" sizes=\"auto, (max-width: 696px) 100vw, 696px\" \/><\/figure>\n\n\n\n<p class=\"has-luminous-vivid-amber-background-color has-background wp-block-paragraph\">\u6ce8\uff1agolang 1.22\u7248\u672c\u540e\u4e0d\u5b58\u5728\u6b64\u95ee\u9898<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">9\u3001\u6307\u5411\u6307\u9488\u7684\u6307\u9488\u53d8\u91cf<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5982\u679c\u7b2c\u4e00\u4e2a\u6307\u9488\u53d8\u91cf\u7684\u503c\u662f\u7b2c\u4e8c\u4e2a\u6307\u9488\u53d8\u91cf\u7684\u5185\u5b58\u5730\u5740\uff0c\u90a3\u4e48\u5c31\u628a\u7b2c\u4e00\u4e2a\u6307\u9488\u53d8\u91cf\u79f0\u4f5c\u6307\u5411\u6307\u9488\u7684\u6307\u9488\u53d8\u91cf\u3002\u4e5f\u5c31\u662f\u8bf4\uff0c\u5b9a\u4e49\u4e00\u4e2a\u6307\u5411\u6307\u9488\u7684\u6307\u9488\u53d8\u91cf\uff0c\u7b2c\u4e00\u4e2a\u6307\u9488\u6307\u5411\u7b2c\u4e8c\u4e2a\u6307\u9488\u7684\u5185\u5b58\u5730\u5740\uff1b\u7b2c\u4e8c\u4e2a\u6307\u9488<br>\u6307\u5411\u53d8\u91cf\u7684\u5185\u5b58\u5730\u5740\uff0c\u8bed\u6cd5\u683c\u5f0f\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>var ptr **type<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>ptr\uff1a\u6307\u5411\u6307\u9488\u7684\u6307\u9488\u53d8\u91cf\u7684\u53d8\u91cf\u540d<\/li>\n\n\n\n<li>** :   \u6307\u5411\u6307\u9488\u7684\u6307\u9488\u53d8\u91cf<\/li>\n\n\n\n<li>type\uff1a\u6307\u5411\u6307\u9488\u7684\u6307\u9488\u53d8\u91cf\u7684\u7c7b\u578b<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0b\u9762\u4f8b\u5b50\uff0c\u58f0\u660e\u5e76\u521d\u59cb\u5316string\u7c7b\u578b\u7684\u53d8\u91cfstr\uff0c\u518d\u58f0\u660estring\u7c7b\u578b\u7684\u6307\u9488\u53d8\u91cfptr\uff0c\u4ee5\u53castring\u7c7b\u578b\u7684\u6307\u5411\u6307\u9488\u7684\u53d8\u91cfpptr\u3002\u4f7f\u7528&amp;\u5b57\u7b26\u83b7\u53d6\u53d8\u91cfstr\u7684\u5185\u5b58\u5730\u5740\uff0c\u8ba9\u6307\u9488ptr\u6307\u5411\u53d8\u91cfstr\u7684\u5185\u5b58\u5730\u5740\uff1b\u518d\u4f7f\u7528&amp;\u5b57\u7b26\u83b7\u53d6\u6307\u9488ptr\u7684\u5185\u5b58\u5730\u5740\uff0c\u8ba9\u6307\u9488pptr\u6307\u5411\u6307\u9488ptr\u7684\u5185\u5b58\u5730\u5740\uff0c\u5982\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"655\" height=\"286\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2025\/05\/2-2.png\" alt=\"\" class=\"wp-image-18096\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2025\/05\/2-2.png 655w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2025\/05\/2-2-300x131.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2025\/05\/2-2-600x262.png 600w\" sizes=\"auto, (max-width: 655px) 100vw, 655px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"654\" height=\"85\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2025\/05\/3-1.png\" alt=\"\" class=\"wp-image-18097\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2025\/05\/3-1.png 654w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2025\/05\/3-1-300x39.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2025\/05\/3-1-600x78.png 600w\" sizes=\"auto, (max-width: 654px) 100vw, 654px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">golang\u4e2d\u53cc\u5f15\u53f7\u3001\u5355\u5f15\u53f7\u3001\u53cd\u5f15\u53f7\u7684\u533a\u522b\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u53cc\u5f15\u53f7\u91cc\u7684\u5b57\u7b26\u4e32\u53ef\u4ee5\u8f6c\u4e49\uff0c\u4e0d\u80fd\u6362\u884c<\/li>\n\n\n\n<li>\u53cd\u5f15\u53f7\u91cc\u9762\u7684\u5185\u5bb9\u4e0d\u80fd\u8f6c\u4e49\uff0c\u53ef\u6362\u884c\uff0c\u4e00\u822c\u7528\u4e8eSQL\u8bed\u53e5\uff0chtml\u7b49\u5927\u6bb5\u5185\u5bb9\uff0c\u4ee5\u53ca\u6b63\u5219\u8868\u8fbe\u5f0f\u7684\u4f7f\u7528<\/li>\n\n\n\n<li>\u5355\u5f15\u53f7\uff0c\u4e00\u822c\u53ea\u80fd\u7528\u6765\u5305\u88f9\u4e00\u4e2a\u5b57\u8282\u7684ASCII\u7801\u5b57\u7b26\uff0c\u4f8b\u5982\uff1avar asc byte = \u2018a\u2019<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Go\u662f\u4e00\u79cd\u9759\u6001\u7c7b\u578b\u8bed\u8a00\uff0c\u6240\u8c13\u9759\u6001\u7c7b\u578b\u8bed\u8a00(\u5f3a\u7c7b\u578b\u8bed\u8a00)\uff0c\u662f\u6307\u9519\u8bef\u7684\u4f7f\u7528\u4e86\u7c7b\u578b\u65f6\uff0c\u7f16\u8bd1\u5668\u5c06\u5f15\u53d1\u9519\u8bef\uff0c\u6240\u8c13\u52a8\u6001\u7c7b\u578b [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":2786,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[111,29],"tags":[],"class_list":["post-2764","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-go","category-yunwei"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":8}},"_links":{"self":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts\/2764","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/comments?post=2764"}],"version-history":[{"count":61,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts\/2764\/revisions"}],"predecessor-version":[{"id":18098,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts\/2764\/revisions\/18098"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/media\/2786"}],"wp:attachment":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/media?parent=2764"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/categories?post=2764"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/tags?post=2764"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}