我使用go version go1.10.3 darwin/amd64
的glide version v0.13.1
项目位于,/Users/robopuff/Development/GoRethink
它的树看起来像这样:
.
├── glide.lock
├── glide.yaml
├── main.go
├── rethinkdb_data
│ ├── 001fbc34-bd63-445f-8590-709ac7475294
│ ├── log_file
│ ├── metadata
│ └── tmp
└── vendor
├── github.com
│ ├── cenkalti
│ │ └── backoff
│ ├── golang
│ │ └── protobuf
│ ├── hailocab
│ │ └── go-hostpool
│ ├── opentracing
│ │ └── opentracing-go
│ └── sirupsen
│ └── logrus
├── golang.org
│ └── x
│ ├── crypto
│ ├── net
│ └── sys
└── gopkg.in
├── fatih
│ └── pool.v2
└── gorethink
└── gorethink.v4
运行后,go run main.go
我受到错误欢迎
❯ go run main.go
main.go:7:2: cannot find package "gopkg.in/gorethink/gorethink.v4" in any of:
/usr/local/go/src/gopkg.in/gorethink/gorethink.v4 (from $GOROOT)
/Users/robopuff/go/src/gopkg.in/gorethink/gorethink.v4 (from $GOPATH)
编译器不应该首先查看vendor吗?