我已使用以下命令安装了httprouter包
dep ensure -add github.com/julienschmidt/httprouter
vendor
└── github.com
├── julienschmidt
│ └── httprouter
然后我安装了uuid包
dep ensure -add github.com/satori/go.uuid
vendor
└── github.com
├── satori
julienschmidt路由器包消失了。 dep为什么删除以前的安装?
删除Gopkg.lock上的条目
Gopkg.toml有此条目
[[constraint]]
name = "github.com/julienschmidt/httprouter"
version = "1.1.0"
[[constraint]]
name = "github.com/satori/go.uuid"
version = "1.2.0"
这会影响什么吗?
我的目录结构
gopath/src/github.com
- services
- service-auth
- service-signup
- vendor
- github.com
感谢。
答案 0 :(得分:0)
"github.com/julienschmidt/httprouter" is not imported by your project, and has been temporarily added to Gopkg.lock and vendor/.
If you run "dep ensure" again before actually importing it, it will disappear from Gopkg.lock and vendor/.
如果您只是运行dep ensure -add {package}
而不在代码中导入它。它将在下一个dep ensure