{"id":44022,"date":"2023-10-23T02:10:54","date_gmt":"2023-09-20T07:34:14","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/go%e8%af%ad%e8%a8%80%e7%9a%84flycheck\/"},"modified":"2024-01-15T11:51:51","modified_gmt":"2024-01-15T03:51:51","slug":"go%e8%af%ad%e8%a8%80%e7%9a%84flycheck","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/go%e8%af%ad%e8%a8%80%e7%9a%84flycheck\/","title":{"rendered":"go\u8bed\u8a00\u7684flycheck"},"content":{"rendered":"<h1>flycheck\u8fd0\u884c\u5f97\u6162&#8230;<\/h1>\n<p>\u867d\u7136\u4e0d\u77e5\u9053\u4ece\u4ec0\u4e48\u65f6\u5019\u5f00\u59cb\uff0c\u4f46\u662f\u5728\u5f15\u5165CGO\u540e\u7f16\u8bd1\u65f6\u95f4\u5927\u5927\u5ef6\u957f\uff0c\u53d8\u5f97\u975e\u5e38\u4e0d\u65b9\u4fbf\u3002<br \/>\n\u5373\u4f7f\u5207\u6362\u5230gometalinter\u6216golangci-lint\uff0c\u4e5f\u51fa\u73b0\u4e86\u540c\u6837\u7684\u73b0\u8c61\u3002<\/p>\n<h1>\u7981\u7528\u68c0\u67e5\u5668<\/h1>\n<p>\u5728Flycheck\u4e2d\uff0c\u6709\u591a\u4e2a\u9002\u7528\u4e8eGolang\u7684\u68c0\u67e5\u5668\uff0c\u50cfgometalinter\u7b49\u7684\u66f4\u6539\u540e\uff0c\u8fd9\u4e9b\u68c0\u67e5\u5668\u5e76\u672a\u88ab\u7981\u7528\u3002<br \/>\n\u7279\u522b\u662ferrcheck\/unconvert\/megacheck\u975e\u5e38\u7f13\u6162\uff0c\u6240\u4ee5\u5982\u679c\u7981\u7528\u8fd93\u4e2a\u68c0\u67e5\u5668\uff0c\u5c31\u53ef\u4ee5\u8fdb\u884c\u5feb\u901f\u68c0\u67e5\u3002<br \/>\n\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u4e0d\u80fd\u4f7f\u7528setq\uff0c\u53ea\u80fd\u4f7f\u7528setq-default\u6765\u7981\u7528\u5b83\u4eec\u3002<\/p>\n<pre class=\"post-pre\"><code>\r\n  <span class=\"p\">(<\/span><span class=\"nv\">setq-default<\/span> <span class=\"nv\">flycheck-disabled-checkers<\/span> <span class=\"o\">'<\/span><span class=\"p\">(<\/span>\r\n                                     <span class=\"c1\">;; go-gofmt<\/span>\r\n                                     <span class=\"c1\">;; go-golint<\/span>\r\n                                     <span class=\"c1\">;; go-vet<\/span>\r\n                                     <span class=\"c1\">;; go-build<\/span>\r\n                                     <span class=\"c1\">;; go-test<\/span>\r\n                                     <span class=\"nv\">go-errcheck<\/span>\r\n                                     <span class=\"nv\">go-unconvert<\/span>\r\n                                     <span class=\"nv\">go-megacheck<\/span>\r\n                                     <span class=\"p\">))<\/span>\r\n<\/code><\/pre>\n<p>\u5e73\u5e38\u6211\u901a\u5e38\u4f7f\u7528golangci-lint\uff0c\u5e76\u5c06\u5176\u5168\u90e8\u7981\u7528\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>flycheck\u8fd0\u884c\u5f97\u6162&#8230; \u867d\u7136\u4e0d\u77e5\u9053\u4ece\u4ec0\u4e48\u65f6\u5019\u5f00\u59cb\uff0c\u4f46\u662f\u5728\u5f15\u5165CGO\u540e\u7f16\u8bd1\u65f6\u95f4\u5927\u5927\u5ef6\u957f\uff0c\u53d8\u5f97\u975e\u5e38 [&hellip;]<\/p>\n","protected":false},"author":11,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-44022","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>go\u8bed\u8a00\u7684flycheck - 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\/go\u8bed\u8a00\u7684flycheck\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"go\u8bed\u8a00\u7684flycheck\" \/>\n<meta property=\"og:description\" content=\"flycheck\u8fd0\u884c\u5f97\u6162&#8230; \u867d\u7136\u4e0d\u77e5\u9053\u4ece\u4ec0\u4e48\u65f6\u5019\u5f00\u59cb\uff0c\u4f46\u662f\u5728\u5f15\u5165CGO\u540e\u7f16\u8bd1\u65f6\u95f4\u5927\u5927\u5ef6\u957f\uff0c\u53d8\u5f97\u975e\u5e38 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/go\u8bed\u8a00\u7684flycheck\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-09-20T07:34:14+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-15T03:51:51+00:00\" \/>\n<meta name=\"author\" content=\"\u65b0, \u97f5\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u65b0, \u97f5\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/go%e8%af%ad%e8%a8%80%e7%9a%84flycheck\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/go%e8%af%ad%e8%a8%80%e7%9a%84flycheck\/\",\"name\":\"go\u8bed\u8a00\u7684flycheck - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-09-20T07:34:14+00:00\",\"dateModified\":\"2024-01-15T03:51:51+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/4ba4019495123db3038fd0809e6959c9\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/go%e8%af%ad%e8%a8%80%e7%9a%84flycheck\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/go%e8%af%ad%e8%a8%80%e7%9a%84flycheck\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/go%e8%af%ad%e8%a8%80%e7%9a%84flycheck\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"go\u8bed\u8a00\u7684flycheck\"}]},{\"@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\/4ba4019495123db3038fd0809e6959c9\",\"name\":\"\u65b0, \u97f5\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d484b6c6e4ae82e8a9efea989e1d2af46d9b6ef128101e63b18f559fca0ae627?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d484b6c6e4ae82e8a9efea989e1d2af46d9b6ef128101e63b18f559fca0ae627?s=96&d=mm&r=g\",\"caption\":\"\u65b0, \u97f5\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/yunxin\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/go%e8%af%ad%e8%a8%80%e7%9a%84flycheck\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"go\u8bed\u8a00\u7684flycheck - 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\/go\u8bed\u8a00\u7684flycheck\/","og_locale":"zh_CN","og_type":"article","og_title":"go\u8bed\u8a00\u7684flycheck","og_description":"flycheck\u8fd0\u884c\u5f97\u6162&#8230; \u867d\u7136\u4e0d\u77e5\u9053\u4ece\u4ec0\u4e48\u65f6\u5019\u5f00\u59cb\uff0c\u4f46\u662f\u5728\u5f15\u5165CGO\u540e\u7f16\u8bd1\u65f6\u95f4\u5927\u5927\u5ef6\u957f\uff0c\u53d8\u5f97\u975e\u5e38 [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/go\u8bed\u8a00\u7684flycheck\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-09-20T07:34:14+00:00","article_modified_time":"2024-01-15T03:51:51+00:00","author":"\u65b0, \u97f5","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u65b0, \u97f5"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/go%e8%af%ad%e8%a8%80%e7%9a%84flycheck\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/go%e8%af%ad%e8%a8%80%e7%9a%84flycheck\/","name":"go\u8bed\u8a00\u7684flycheck - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-09-20T07:34:14+00:00","dateModified":"2024-01-15T03:51:51+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/4ba4019495123db3038fd0809e6959c9"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/go%e8%af%ad%e8%a8%80%e7%9a%84flycheck\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/go%e8%af%ad%e8%a8%80%e7%9a%84flycheck\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/go%e8%af%ad%e8%a8%80%e7%9a%84flycheck\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"go\u8bed\u8a00\u7684flycheck"}]},{"@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\/4ba4019495123db3038fd0809e6959c9","name":"\u65b0, \u97f5","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d484b6c6e4ae82e8a9efea989e1d2af46d9b6ef128101e63b18f559fca0ae627?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d484b6c6e4ae82e8a9efea989e1d2af46d9b6ef128101e63b18f559fca0ae627?s=96&d=mm&r=g","caption":"\u65b0, \u97f5"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/yunxin\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/go%e8%af%ad%e8%a8%80%e7%9a%84flycheck\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/44022","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\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=44022"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/44022\/revisions"}],"predecessor-version":[{"id":59218,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/44022\/revisions\/59218"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=44022"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=44022"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=44022"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}