{"id":44564,"date":"2023-09-05T14:56:21","date_gmt":"2023-05-25T13:59:41","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8-go-1-20-%e4%b9%8b%e5%90%8e%e5%ae%89%e8%a3%85-godoc%e3%80%82\/"},"modified":"2024-01-15T12:08:21","modified_gmt":"2024-01-15T04:08:21","slug":"%e5%9c%a8-go-1-20-%e4%b9%8b%e5%90%8e%e5%ae%89%e8%a3%85-godoc%e3%80%82","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8-go-1-20-%e4%b9%8b%e5%90%8e%e5%ae%89%e8%a3%85-godoc%e3%80%82\/","title":{"rendered":"\u5728 go 1.20 \u4e4b\u540e\u5b89\u88c5 godoc"},"content":{"rendered":"<p>\u6211\u91cd\u65b0\u5b89\u88c5\u4e86Go\u7684godoc\uff0c\u56e0\u4e3a\u51fa\u73b0\u4e86\u9519\u8bef\u3002<br \/>\n\u7136\u800c\uff0c\u6309\u7167\u4ee5\u524d\u7684\u5b89\u88c5\u65b9\u6cd5\u4ecd\u7136\u51fa\u73b0\u9519\u8bef\u3002<br \/>\n\u67e5\u8be2\u540e\u53d1\u73b0\u5b89\u88c5\u65b9\u5f0f\u5df2\u7ecf\u6539\u53d8\u4e86\u3002<\/p>\n<p>\uff11\uff0e\u68c0\u67e5godoc\u7684\u6700\u65b0\u7248\u672c\u662f\u5426\u53ef\u7528\uff1a<\/p>\n<pre class=\"post-pre\"><code>go list -u -m -versions golang.org\/x\/tools\/cmd\/godoc\r\n\r\n<\/code><\/pre>\n<p>\u5982\u679c\u65e0\u6cd5\u83b7\u5f97\u6700\u65b0\u7248\u672c\uff0c\u60a8\u53ef\u4ee5\u5c1d\u8bd5\u5b89\u88c5\u7279\u5b9a\u7248\u672c\u7684godoc\u3002\u4f8b\u5982\uff0c\u8981\u5b89\u88c5v0.1.2\u7248\u672c\uff0c\u8bf7\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre class=\"post-pre\"><code>   go install golang.org\/x\/tools\/cmd\/godoc@v0.1.2\r\n\r\n<\/code><\/pre>\n<p>\u5b89\u88c5\u6700\u65b0\u7248\u7684godoc\u65f6\uff0c\u8bf7\u52a1\u5fc5\u5220\u9664\u547d\u4ee4\u672b\u5c3e\u7684\u70b9\u3002\u6b63\u786e\u7684\u547d\u4ee4\u662f<\/p>\n<pre class=\"post-pre\"><code>go install golang.org\/x\/tools\/cmd\/godoc@latest\r\n<\/code><\/pre>\n<p>\u5c3d\u7ba1\u5b89\u88c5\u5df2\u7ecf\u5b8c\u6210\uff0c\u4f46\u51fa\u73b0\u4e86\u9519\u8bef\u3002<\/p>\n<pre class=\"post-pre\"><code>(base) PS &gt; godoc os\/user Current\r\nUnexpected arguments. Use \"go doc\" for command-line help output instead. For example, \"go doc fmt.Printf\".\r\nusage: godoc -http=localhost:6060\r\n  -goroot string\r\n        Go root directory (default \"C:\\\\Program Files\\\\Go\")\r\n  -http string\r\n        HTTP service address (default \"localhost:6060\")\r\n  -index\r\n        enable search index\r\n  -index_files string\r\n        glob pattern specifying index files; if not empty, the index is read from these files in sorted order\r\n  -index_interval duration\r\n        interval of indexing; 0 for default (5m), negative to only index once at startup\r\n  -index_throttle float\r\n<\/code><\/pre>\n<p>\u67e5\u4e86\u4e00\u4e0b\uff0c\u547d\u4ee4\u7684\u4f7f\u7528\u65b9\u6cd5\u548c\u4ee5\u524d\u6709\u6240\u53d8\u5316\u3002<\/p>\n<pre class=\"post-pre\"><code>go doc &lt;package-name&gt;\r\n<\/code><\/pre>\n<p>\u6211\u6210\u529f\u5730\u6267\u884c\u4e86\u8fd9\u4e2a\u547d\u4ee4\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6211\u91cd\u65b0\u5b89\u88c5\u4e86Go\u7684godoc\uff0c\u56e0\u4e3a\u51fa\u73b0\u4e86\u9519\u8bef\u3002 \u7136\u800c\uff0c\u6309\u7167\u4ee5\u524d\u7684\u5b89\u88c5\u65b9\u6cd5\u4ecd\u7136\u51fa\u73b0\u9519\u8bef\u3002 \u67e5\u8be2\u540e\u53d1\u73b0\u5b89\u88c5\u65b9\u5f0f\u5df2\u7ecf [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-44564","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u5728 go 1.20 \u4e4b\u540e\u5b89\u88c5 godoc - Blog - Silicon Cloud<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/\u5728-go-1-20-\u4e4b\u540e\u5b89\u88c5-godoc\u3002\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5728 go 1.20 \u4e4b\u540e\u5b89\u88c5 godoc\" \/>\n<meta property=\"og:description\" content=\"\u6211\u91cd\u65b0\u5b89\u88c5\u4e86Go\u7684godoc\uff0c\u56e0\u4e3a\u51fa\u73b0\u4e86\u9519\u8bef\u3002 \u7136\u800c\uff0c\u6309\u7167\u4ee5\u524d\u7684\u5b89\u88c5\u65b9\u6cd5\u4ecd\u7136\u51fa\u73b0\u9519\u8bef\u3002 \u67e5\u8be2\u540e\u53d1\u73b0\u5b89\u88c5\u65b9\u5f0f\u5df2\u7ecf [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u5728-go-1-20-\u4e4b\u540e\u5b89\u88c5-godoc\u3002\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-05-25T13:59:41+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-15T04:08:21+00:00\" \/>\n<meta name=\"author\" content=\"\u79d1, \u9896\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u79d1, \u9896\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8-go-1-20-%e4%b9%8b%e5%90%8e%e5%ae%89%e8%a3%85-godoc%e3%80%82\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8-go-1-20-%e4%b9%8b%e5%90%8e%e5%ae%89%e8%a3%85-godoc%e3%80%82\/\",\"name\":\"\u5728 go 1.20 \u4e4b\u540e\u5b89\u88c5 godoc - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-05-25T13:59:41+00:00\",\"dateModified\":\"2024-01-15T04:08:21+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/8ca01ba7f7362ad4edb7da206a12f29e\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8-go-1-20-%e4%b9%8b%e5%90%8e%e5%ae%89%e8%a3%85-godoc%e3%80%82\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8-go-1-20-%e4%b9%8b%e5%90%8e%e5%ae%89%e8%a3%85-godoc%e3%80%82\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8-go-1-20-%e4%b9%8b%e5%90%8e%e5%ae%89%e8%a3%85-godoc%e3%80%82\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5728 go 1.20 \u4e4b\u540e\u5b89\u88c5 godoc\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/8ca01ba7f7362ad4edb7da206a12f29e\",\"name\":\"\u79d1, \u9896\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/8a6fb3cc7ba2f69d2189ba532aec4633ea7ed75ac0af162ec367cb3abc0fb2af?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/8a6fb3cc7ba2f69d2189ba532aec4633ea7ed75ac0af162ec367cb3abc0fb2af?s=96&d=mm&r=g\",\"caption\":\"\u79d1, \u9896\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/keying\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8-go-1-20-%e4%b9%8b%e5%90%8e%e5%ae%89%e8%a3%85-godoc%e3%80%82\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u5728 go 1.20 \u4e4b\u540e\u5b89\u88c5 godoc - Blog - Silicon Cloud","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/\u5728-go-1-20-\u4e4b\u540e\u5b89\u88c5-godoc\u3002\/","og_locale":"zh_CN","og_type":"article","og_title":"\u5728 go 1.20 \u4e4b\u540e\u5b89\u88c5 godoc","og_description":"\u6211\u91cd\u65b0\u5b89\u88c5\u4e86Go\u7684godoc\uff0c\u56e0\u4e3a\u51fa\u73b0\u4e86\u9519\u8bef\u3002 \u7136\u800c\uff0c\u6309\u7167\u4ee5\u524d\u7684\u5b89\u88c5\u65b9\u6cd5\u4ecd\u7136\u51fa\u73b0\u9519\u8bef\u3002 \u67e5\u8be2\u540e\u53d1\u73b0\u5b89\u88c5\u65b9\u5f0f\u5df2\u7ecf [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u5728-go-1-20-\u4e4b\u540e\u5b89\u88c5-godoc\u3002\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-05-25T13:59:41+00:00","article_modified_time":"2024-01-15T04:08:21+00:00","author":"\u79d1, \u9896","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u79d1, \u9896","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8-go-1-20-%e4%b9%8b%e5%90%8e%e5%ae%89%e8%a3%85-godoc%e3%80%82\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8-go-1-20-%e4%b9%8b%e5%90%8e%e5%ae%89%e8%a3%85-godoc%e3%80%82\/","name":"\u5728 go 1.20 \u4e4b\u540e\u5b89\u88c5 godoc - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-05-25T13:59:41+00:00","dateModified":"2024-01-15T04:08:21+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/8ca01ba7f7362ad4edb7da206a12f29e"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8-go-1-20-%e4%b9%8b%e5%90%8e%e5%ae%89%e8%a3%85-godoc%e3%80%82\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8-go-1-20-%e4%b9%8b%e5%90%8e%e5%ae%89%e8%a3%85-godoc%e3%80%82\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8-go-1-20-%e4%b9%8b%e5%90%8e%e5%ae%89%e8%a3%85-godoc%e3%80%82\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u5728 go 1.20 \u4e4b\u540e\u5b89\u88c5 godoc"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/8ca01ba7f7362ad4edb7da206a12f29e","name":"\u79d1, \u9896","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/8a6fb3cc7ba2f69d2189ba532aec4633ea7ed75ac0af162ec367cb3abc0fb2af?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8a6fb3cc7ba2f69d2189ba532aec4633ea7ed75ac0af162ec367cb3abc0fb2af?s=96&d=mm&r=g","caption":"\u79d1, \u9896"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/keying\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8-go-1-20-%e4%b9%8b%e5%90%8e%e5%ae%89%e8%a3%85-godoc%e3%80%82\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/44564","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=44564"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/44564\/revisions"}],"predecessor-version":[{"id":59335,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/44564\/revisions\/59335"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=44564"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=44564"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=44564"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}