go get -u github.com/kardianos/govendor
#首先進入本身的項目,好比 項目是flame 目錄在/home/flame/go/src/flame cd /home/flame/go/src/flame govendor init
會生成/home/flame/go/src/flame/vendor/vendor.json 文件mysql
govendor add +e
vendor 文件夾下有依賴包git
ls #github.com vendor.json
vendor/vendor.json 文件有依賴信息
以下github
{ "comment": "", "ignore": "test", "package": [ { "checksumSHA1": "wmiJbuFVCxg22zwXIeLsVCudyeY=", "path": "github.com/go-sql-driver/mysql", "revision": "c45f530f8e7fe40f4687eaa50d0c8c5f1b66f9e0", "revisionTime": "2018-12-18T12:36:37Z" }, { "checksumSHA1": "GWZt8djqK/GoHgon8POT508+BXM=", "path": "github.com/jinzhu/gorm", "revision": "5ad6f621e6f59672f5b5061df85b243436fde048", "revisionTime": "2018-12-13T13:04:51Z" }, { "checksumSHA1": "eECxSkwh0WmhLwaxHfkvcLOWS08=", "path": "github.com/jinzhu/gorm/dialects/mysql", "revision": "5ad6f621e6f59672f5b5061df85b243436fde048", "revisionTime": "2018-12-13T13:04:51Z" }, { "checksumSHA1": "4eelJOSLZoDzLuaJvgilOBVNovU=", "path": "github.com/jinzhu/inflection", "revision": "04140366298a54a039076d798123ffa108fff46c", "revisionTime": "2018-03-08T03:36:59Z" } ], "rootPath": "flame" }