{"id":2884,"date":"2019-02-26T17:15:19","date_gmt":"2019-02-26T09:15:19","guid":{"rendered":"https:\/\/damogame.cn:15443\/wordpress\/?p=2884"},"modified":"2019-02-26T17:15:19","modified_gmt":"2019-02-26T09:15:19","slug":"go%e4%b9%8b%e5%ae%98%e6%96%b9%e4%be%9d%e8%b5%96%e7%ae%a1%e7%90%86%e5%b7%a5%e5%85%b7dep%e5%ae%89%e8%a3%85%e5%92%8c%e4%bd%bf%e7%94%a8","status":"publish","type":"post","link":"https:\/\/i007.cc\/wordpress\/archives\/2884","title":{"rendered":"go\u4e4b\u5b98\u65b9\u4f9d\u8d56\u7ba1\u7406\u5de5\u5177dep\u5b89\u88c5\u548c\u4f7f\u7528"},"content":{"rendered":"<div class=\"article-header-box\">\n<div class=\"article-header\">\n<div class=\"article-title-box\"><\/div>\n<\/div>\n<\/div>\n<article class=\"baidu_pl\">\n<div id=\"article_content\" class=\"article_content clearfix csdn-tracking-statistics\" data-pid=\"blog\" data-mod=\"popu_307\" data-dsm=\"post\">\n<div class=\"article-copyright\"><strong>\u524d\u8a00<\/strong><\/div>\n<div id=\"content_views\" class=\"markdown_views prism-atom-one-dark\">\n<p>\u5927\u5bb6\u90fd\u77e5\u9053go\u6ca1\u6709\u4e00\u4e2a\u81ea\u5df1\u7684\u5305\u7ba1\u7406\u5e73\u53f0\u3002\u793e\u533a\u91ccgo\u7684\u7b2c\u4e09\u65b9\u5305\u6258\u7ba1\u5728\u5404\u4e2agit\u6258\u7ba1\u5e73\u53f0\u3002\u9700\u8981\u7528\u5230\u5305\u65f6\u901a\u8fc7go get \u547d\u4ee4\u5de5\u5177\u5b89\u88c5\uff0c\u4f46\u8fd9\u4e2a\u5de5\u5177\u6ca1\u6709\u7248\u672c\u63cf\u8ff0\u6027\u6587\u4ef6\uff0c\u5728go\u7684\u4e16\u754c\u91cc\u6ca1\u6709\u201cpackage.json\u201d\u8fd9\u79cd\u6587\u4ef6\u3002\u8fd9\u4e2a\u7ed9\u6211\u4eec\u5e26\u6765\u76f4\u63a5\u7684\u5f71\u54cd\u5c31\u662f\u4f9d\u8d56\u653e\u5728\u5916\u7f51\uff0c\u800c\u4e14\u6ca1\u6709\u7248\u672c\u7ea6\u675f\uff0c\u8fd9\u4e2a\u6708\u4e0b\u7684\u7248\u672c\uff0c\u53ef\u80fd\u4e0b\u4e2a\u6708\u66f4\u65b0\u4e86\u3002\u6709\u9053\u662f\u201c<a href=\"https:\/\/www.baidu.com\/s?wd=%E5%B7%A5%E6%AC%B2%E5%96%84%E5%85%B6%E4%BA%8B%EF%BC%8C%E5%BF%85%E5%85%88%E5%88%A9%E5%85%B6%E5%99%A8&amp;tn=24004469_oem_dg&amp;rsv_dl=gh_pl_sl_csd\" target=\"_blank\" rel=\"noopener noreferrer\">\u5de5\u6b32\u5584\u5176\u4e8b\uff0c\u5fc5\u5148\u5229\u5176\u5668<\/a>\u201d\uff0c\u8fd9\u4e2a\u65f6\u5019\u6211\u4eec\u5c31\u9700\u8981\u4e00\u4e2a\u4f9d\u8d56\u7ba1\u7406\u5de5\u5177\u3002<br \/>\n\u76ee\u524d\u4f9d\u8d56\u5de5\u5177\u6709\u5f88\u591a\uff0c\u5982\uff1aglide\u3001godep\u7b49\u3002\u4eca\u5929\u4e3b\u8981\u8bb2\u662f\u5b98\u65b9\u51fa\u54c1\u7684dep,\u6ce8\u610f\u5b83\u548cgodep\u4e0d\u662f\u4e00\u4e2a\u4e1c\u897f\u3002<br \/>\ngithub\u5730\u5740\u4e0d\u540c<br \/>\ngodep :<a href=\"https:\/\/github.com\/tools\/godep\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">https:\/\/github.com\/tools\/godep<\/a><br \/>\ndep:<a href=\"https:\/\/github.com\/golang\/dep\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">https:\/\/github.com\/golang\/dep<\/a><br \/>\n\u6309\u7167<a href=\"https:\/\/medium.com\/i-can-haz-downtime\/dep-101-c85e8ab6ed45\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Peter Bourgon\u535a\u6587<\/a>\u6765\u8bf4\uff0c\u5b83\u4eec\u7684\u4f5c\u8005\u90fd\u6709\u76f8\u540c\u7684\u4eba\uff0c\u4f46\u662f\u4e00\u4e2a\u662fdep\u662f\u5b98\u65b9\u7248\u672c\uff0cgodep\u662f\u7b2c\u4e09\u65b9\u5de5\u5177\u3002<br \/>\n\u9009\u62e9dep\u6709\u4ec0\u4e48\u597d\u5904\u5462\uff1f<br \/>\n1\u3001\u5b98\u65b9\u51fa\u7684\uff0c\u4e0d\u7528\u62c5\u5fc3\u66f4\u65b0\u7ef4\u62a4\u95ee\u9898\u3002<br \/>\n2\u3001\u76f8\u5bf9\u6765\u8bf4\uff0c\u6bd4\u5176\u4ed6\u7b2c\u4e09\u65b9\u5de5\u5177\u517c\u5bb9\u95ee\u9898\u8981\u597d\u3002<br \/>\n\u8fd8\u6709\u7b49\u7528\u8fc7\u4ee5\u540e\u518d\u8865\u3002<\/p>\n<p><strong>\u73af\u5883\u8981\u6c42<\/strong><br \/>\nGolang &gt;= 1.9<\/p>\n<p><strong>\u5b89\u88c5<\/strong><br \/>\nOn other platforms you can use the\u00a0<a href=\"http:\/\/install.sh\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">install.sh<\/a>\u00a0script:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">$ curl https:\/\/raw.githubusercontent.com\/golang\/dep\/master\/install.sh | sh<\/pre>\n<p>&nbsp;<\/p>\n<p>\u5b89\u88c5\u5b8c\u6210\uff0c\u67e5\u770bDEP\u7248\u672c<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">$ dep version<\/pre>\n<p>&nbsp;<\/p>\n<p>\u8f93\u51fa<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">dep:\r\n version     : v0.5.0\r\n build date  : 2018-07-26\r\n git hash    : 224a564\r\n go version  : go1.10.3\r\n go compiler : gc\r\n platform    : linux\/amd64\r\n features    : ImportDuringSolve=false<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>\u521d\u59cb\u5316<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">mkdir $GOPATH\/src\/test\r\ncd  $GOPATH\/src\/test\r\ndep init<\/pre>\n<p>&nbsp;<\/p>\n<p>test\u76ee\u5f55\u751f\u6210\u5982\u4e0b\u6587\u4ef6<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">\u251c\u2500\u2500 Gopkg.lock\r\n\u251c\u2500\u2500 Gopkg.toml\r\n\u2514\u2500\u2500 vendor<\/pre>\n<p>&nbsp;<\/p>\n<p>\u5176\u4e2d<\/p>\n<ul>\n<li>Gopkg.lock \u662f\u751f\u6210\u7684\u6587\u4ef6\uff0c\u4e0d\u8981\u624b\u5de5\u4fee\u6539\u00a0<a href=\"https:\/\/golang.github.io\/dep\/docs\/Gopkg.toml.html\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Gopkg.lock \u5b98\u65b9\u6587\u6863<\/a>\u3002<\/li>\n<li>Gopkg.toml \u662f\u4f9d\u8d56\u7ba1\u7406\u7684\u6838\u5fc3\u6587\u4ef6\uff0c\u53ef\u4ee5\u751f\u6210\u4e5f\u53ef\u4ee5\u624b\u52a8\u4fee\u6539\uff0c<br \/>\n\u4e00\u822c\u60c5\u51b5\u4e0bGopkg.toml\u91cc\u9762\u53ea\u5b9a\u4e49\u76f4\u63a5\u4f9d\u8d56\u9879\uff0c\u800cGopkg.lock\u91cc\u9762\u9664\u4e86\u5305\u542bGopkg.toml\u4e2d\u7684\u6240\u6709\u9879\u4e4b\u5916\uff0c\u8fd8\u5305\u542b\u4f20\u9012\u4f9d\u8d56\u9879\u3002\u6bd4\u5982\u6211\u4eec\u7684\u9879\u76ee\u4f9d\u8d56\u9879\u76eeA\uff0c \u800c\u9879\u76eeA\u53c8\u4f9d\u8d56B\u3001C\uff0c\u90a3\u4e48\u53ea\u6709A\u4f1a\u5305\u542b\u5728Gopkg.toml\u4e2d\uff0c\u800cA\u3001B\u3001C\u90fd\u4f1a\u5b9a\u4e49\u5728Gopkg.lock\u4e2d\u3002\u6240\u4ee5Gopkg.lock\u5b9a\u4e49\u4e86\u6240\u6709\u4f9d\u8d56\u7684\u9879\u76ee\u7684\u8be6\u7ec6\u4fe1\u606f\uff08commit ID\u548cpackages\uff09\uff0c\u4f7f\u5f97\u6bcf\u6b21build\u6211\u4eec\u81ea\u5df1\u7684\u9879\u76ee\u65f6\uff0c\u59cb\u7ec8\u57fa\u4e8e\u786e\u5b9a\u4e0d\u53d8\u7684\u4f9d\u8d56\u9879\u3002<a href=\"https:\/\/golang.github.io\/dep\/docs\/Gopkg.lock.html\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Gopkg.toml \u5b98\u65b9\u6587\u6863<\/a>\u3002<\/li>\n<li>vendor\u76ee\u5f55\u662f golang1.5 \u4ee5\u540e\u4f9d\u8d56\u7ba1\u7406\u76ee\u5f55\uff0c\u8fd9\u4e2a\u76ee\u5f55\u7684\u4f9d\u8d56\u4ee3\u7801\u662f\u4f18\u5148\u52a0\u8f7d\u7684\uff0c\u7c7b\u4f3c node \u7684 node_module \u76ee\u5f55\u3002<br \/>\n\u4e09\u4e2a\u4e4b\u95f4\u7684\u5173\u7cfb<br \/>\n<img decoding=\"async\" src=\"https:\/\/img-blog.csdn.net\/20180814165739927?watermark\/2\/text\/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2d1eWFuMDMxOQ==\/font\/5a6L5L2T\/fontsize\/400\/fill\/I0JBQkFCMA==\/dissolve\/70\" alt=\"\u8fd9\u91cc\u5199\u56fe\u7247\u63cf\u8ff0\" \/><\/li>\n<\/ul>\n<p><strong>\u4f9d\u8d56\u7ba1\u7406<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\"># \u4f9d\u8d56\u7ba1\u7406\u5e2e\u52a9\r\ndep help ensure\r\n# \u6dfb\u52a0\u4e00\u6761\u4f9d\u8d56\r\ndep ensure -add github.com\/bitly\/go-simplejson\r\n# \u8fd9\u91cc @= \u53c2\u6570\u6307\u5b9a\u7684\u662f \u67d0\u4e2a tag\r\ndep ensure -add github.com\/bitly\/go-simplejson@=0.4.3\r\n# \u6dfb\u52a0\u540e\u4e00\u5b9a\u8bb0\u4f4f\u6267\u884c \u786e\u4fdd \u540c\u6b65\r\ndep ensure\r\n# \u5efa\u8bae\u4f7f\u7528\r\ndep ensure -v\r\n#  \u5220\u9664\u6ca1\u6709\u7528\u5230\u7684 package\r\ndep prune -v<\/pre>\n<p>&nbsp;<\/p>\n<p>\u53c2\u6570-v\uff0c\u662f\u4e3a\u4e86\u66f4\u597d\u7684\u67e5\u770b\u6267\u884c\u8fc7\u7a0b\uff0c\u5efa\u8bae\u52a0\u4e0a\u3002<\/p>\n<p><strong>\u4f9d\u8d56\u66f4\u65b0<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">dep ensure -update -v<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>\u5b9e\u4f8b<\/strong><br \/>\n\u4e0b\u9762\u901a\u8fc7\u5b9e\u4f8b\u5c55\u793adep\u5177\u4f53\u7684\u529f\u80fd<br \/>\n\u5728\u76ee\u5f55$GOPATH\/src\/test\u4e0b,\u521b\u5efamain.go\u6587\u4ef6<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">package main\r\n\r\nimport (\r\n    \"net\/http\"\r\n    \"os\"\r\n\r\n    \"github.com\/gorilla\/mux\"\r\n)\r\n\r\nfunc main() {\r\n    r := mux.NewRouter()\r\n    r.Handle(\"\/\", http.FileServer(http.Dir(\".\")))\r\n    http.ListenAndServe(\":\"+os.Getenv(\"PORT\"), r)\r\n}<\/pre>\n<p>&nbsp;<\/p>\n<p>\u8fd9\u4e2a\u65f6\u5019\u5982\u679c\u76f4\u63a5\u6267\u884c\u66f4\u65b0\u4f9d\u8d56<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">dep ensure -update -v<\/pre>\n<p>&nbsp;<\/p>\n<p>\u4f60\u4f1a\u53d1\u73b0Gopkg.lock\u6ca1\u6709\u53d8\u5316\uff0c\u4ec5Gopkg.toml\u548cvendor\u53d1\u751f\u4e86\u53d8\u3002<br \/>\nGopkg.toml<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\"># This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.\r\n\r\n\r\n[[projects]]\r\n  digest = \"1:c79fb010be38a59d657c48c6ba1d003a8aa651fa56b579d959d74573b7dff8e1\"\r\n  name = \"github.com\/gorilla\/context\"\r\n  packages = [\".\"]\r\n  pruneopts = \"UT\"\r\n  revision = \"08b5f424b9271eedf6f9f0ce86cb9396ed337a42\"\r\n  version = \"v1.1.1\"\r\n\r\n[[projects]]\r\n  digest = \"1:e73f5b0152105f18bc131fba127d9949305c8693f8a762588a82a48f61756f5f\"\r\n  name = \"github.com\/gorilla\/mux\"\r\n  packages = [\".\"]\r\n  pruneopts = \"UT\"\r\n  revision = \"e3702bed27f0d39777b0b37b664b6280e8ef8fbf\"\r\n  version = \"v1.6.2\"\r\n\r\n[solve-meta]\r\n  analyzer-name = \"dep\"\r\n  analyzer-version = 1\r\n  input-imports = [\"github.com\/gorilla\/mux\"]\r\n  solver-name = \"gps-cdcl\"\r\n  solver-version = 1\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>vendor\u4e0b\u6709\u4e00\u4e0b\u6587\u4ef6<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\"> $ tree\r\n.\r\n\u2514\u2500\u2500 github.com\r\n    \u2514\u2500\u2500 gorilla\r\n        \u251c\u2500\u2500 context\r\n        \u2502   \u251c\u2500\u2500 context.go\r\n        \u2502   \u251c\u2500\u2500 doc.go\r\n        \u2502   \u251c\u2500\u2500 LICENSE\r\n        \u2502   \u2514\u2500\u2500 README.md\r\n        \u2514\u2500\u2500 mux\r\n            \u251c\u2500\u2500 context_gorilla.go\r\n            \u251c\u2500\u2500 context_native.go\r\n            \u251c\u2500\u2500 doc.go\r\n            \u251c\u2500\u2500 ISSUE_TEMPLATE.md\r\n            \u251c\u2500\u2500 LICENSE\r\n            \u251c\u2500\u2500 middleware.go\r\n            \u251c\u2500\u2500 mux.go\r\n            \u251c\u2500\u2500 README.md\r\n            \u251c\u2500\u2500 regexp.go\r\n            \u251c\u2500\u2500 route.go\r\n            \u2514\u2500\u2500 test_helpers.go\r\n\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>dep ensure -add \u4f1a\u66f4\u65b0Gopkg.toml\u548cGopkg.lock\u5e76\u5b89\u88c5\u4f9d\u8d56\u9879\u81f3vendor\/\u4e0b\uff0c\u9700\u8981\u6267\u884cdep ensure -add \uff0c<a href=\"http:\/\/xn--github-2x8i.com\/apodemakeles\/ugo\/time%E4%B8%BA%E4%BE%8B\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\u4ee5github.com\/apodemakeles\/ugo\/time\u4e3a\u4f8b<\/a><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">dep ensure -add github.com\/apodemakeles\/ugo\/time<\/pre>\n<p>&nbsp;<\/p>\n<p>\u8fd9\u65f6\u5019\u4f1a\u62a5\u5982\u4e0b\u4fe1\u606f<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">\"github.com\/apodemakeles\/ugo\/time\" is not imported by your project, and has been temporarily added to Gopkg.lock and vendor\/.\r\nIf you run \"dep ensure\" again before actually importing it, it will disappear from Gopkg.lock and vendor\/.<\/pre>\n<p>&nbsp;<\/p>\n<p>\u5b83\u8bf4\u4f60\u6ca1\u6709\u5728\u4f60\u7684\u4ee3\u7801\u4e2d\u4f7f\u7528\u8fd9\u4e2a\u65b0\u7684\u4f9d\u8d56\u9879\u3002\u73b0\u5728\u8ba9\u6211\u4eec\u6765\u770b\u770bGopkg.toml\u6587\u4ef6\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\"># Gopkg.toml example\r\n#\r\n# Refer to https:\/\/golang.github.io\/dep\/docs\/Gopkg.toml.html\r\n# for detailed Gopkg.toml documentation.\r\n#\r\n# required = [\"github.com\/user\/thing\/cmd\/thing\"]\r\n# ignored = [\"github.com\/user\/project\/pkgX\", \"bitbucket.org\/user\/project\/pkgA\/pkgY\"]\r\n#\r\n# [[constraint]]\r\n#   name = \"github.com\/user\/project\"\r\n#   version = \"1.0.0\"\r\n#\r\n# [[constraint]]\r\n#   name = \"github.com\/user\/project2\"\r\n#   branch = \"dev\"\r\n#   source = \"github.com\/myfork\/project2\"\r\n#\r\n# [[override]]\r\n#   name = \"github.com\/x\/y\"\r\n#   version = \"2.4.0\"\r\n#\r\n# [prune]\r\n#   non-go = false\r\n#   go-tests = true\r\n#   unused-packages = true\r\n\r\n\r\n[prune]\r\n  go-tests = true\r\n  unused-packages = true\r\n\r\n\r\n[[constraint]]\r\n  name = \"github.com\/apodemakeles\/ugo\"\r\n  version = \"0.3.0\"<\/pre>\n<p>&nbsp;<\/p>\n<p>\u8fd9\u4e2a\u65f6\u5019Gopkg.toml\u6587\u4ef6\u591a\u4e86[[constraint]]\u4fe1\u606f\uff0c\u540c\u65f6\u5728vendor\u6587\u4ef6\u5939\u548c\u4fee\u6539.lock\u6587\u4ef6\u4e2d\u5b89\u88c5\u6700\u65b0\u7248\u672c\u3002\u8fd9\u4e2a\u65f6\u5019\u6267\u884cdep ensure \u4f1a\u62a5\u9519\u8bef<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">Warning: the following project(s) have [[constraint]] stanzas in Gopkg.toml:\r\n\r\n  \u2717  github.com\/apodemakeles\/ugo\r\n\r\nHowever, these projects are not direct dependencies of the current project:\r\nthey are not imported in any .go files, nor are they in the 'required' list in\r\nGopkg.toml. Dep only applies [[constraint]] rules to direct dependencies, so\r\nthese rules will have no effect.\r\n\r\nEither import\/require packages from these projects so that they become direct\r\ndependencies, or convert each [[constraint]] to an [[override]] to enforce rules\r\non these projects, if they happen to be transitive dependencies.<\/pre>\n<p>&nbsp;<\/p>\n<p>\u5982\u679c\u4e0d\u60f3\u62a5\u9519\u53ea\u9700import\u4ee3\u7801\u4e2d\u7684\u4f9d\u8d56\u9879\uff0c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">import \"github.com\/apodemakeles\/ugo\/time\"<\/pre>\n<p>&nbsp;<\/p>\n<p>\u7136\u540e\u6267\u884cdep ensure\u3002<br \/>\n\u4e00\u822c\u5728\u9879\u76ee\u4e2d\u65b0\u589e\u4ee3\u7801\uff0c\u53ea\u9700\u6267\u884cdep ensure\uff0c\u5b83\u5c06\u5728vendor\u6587\u4ef6\u5939\u548c\u4fee\u6539.lock\u6587\u4ef6\u4e2d\u5b89\u88c5\u6700\u65b0\u7248\u672c\u3002<\/p>\n<p><strong>\u67e5\u770b\u4f9d\u8d56\u72b6\u6001<\/strong><\/p>\n<p>\u901a\u8fc7\u6267\u884cdep status\u547d\u4ee4\uff0c\u5c06\u5217\u51fa\u60a8\u7684\u5e94\u7528\u7a0b\u5e8f\u4e2d\u4f7f\u7528\u7684\u7248\u672c\u4ee5\u53ca\u5f00\u53d1\u4eba\u5458\u53d1\u5e03\u7684\u6700\u65b0\u7248\u672c\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">PROJECT                     CONSTRAINT  VERSION  REVISION  LATEST  PKGS USED\r\ngithub.com\/gorilla\/context  v1.1.1      v1.1.1   08b5f42   v1.1.1  1  \r\ngithub.com\/gorilla\/mux      v1.6.2      v1.6.2   e3702be   v1.6.2  1<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>\u5220\u9664\u4f9d\u8d56<\/strong><\/p>\n<p>\u4fee\u6539Gopkg.toml\u6587\u4ef6\u76f8\u5e94\u5185\u5bb9\uff0c\u540c\u65f6\u8981\u4fdd\u8bc1\u4ee3\u7801\u4e2d\u6ca1\u6709\u5f15\u7528\uff0c\u518d\u6267\u884cdep ensure \u6216dep ensure -update \u5747\u53ef\u3002<br \/>\n\u53c2\u8003<br \/>\n<a href=\"https:\/\/golang.github.io\/dep\/docs\/introduction.html\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">https:\/\/golang.github.io\/dep\/docs\/introduction.html<\/a><br \/>\n<a href=\"https:\/\/jjude.com\/go-dep\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">https:\/\/jjude.com\/go-dep\/<\/a><\/p>\n<\/div>\n<\/div>\n<\/article>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u8a00 \u5927\u5bb6\u90fd\u77e5\u9053go\u6ca1\u6709\u4e00\u4e2a\u81ea\u5df1\u7684\u5305\u7ba1\u7406<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","footnotes":""},"categories":[],"tags":[122],"class_list":["post-2884","post","type-post","status-publish","format-standard","hentry","tag-06-godocker"],"_links":{"self":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/posts\/2884","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/comments?post=2884"}],"version-history":[{"count":0,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/posts\/2884\/revisions"}],"wp:attachment":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/media?parent=2884"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/categories?post=2884"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/tags?post=2884"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}