我在OSX上使用go 1.8.1
我的GOPATH
/Users/alex/.gvm/pkgsets/go1.8.1/test-api:/Users/alex/.gvm/pkgsets/go1.8.1/global
我的文件夹结构是这样的(使用gvm):
/Users/alex/.gvm/pkgsets/go1.8.1/test-api
├── bin
│ └── gvt
├── overlay
│ ├── bin
│ └── lib
│ └── pkgconfig
├── pkg
└── src
└── test-go-api -> /Users/alex/code/test-go-api
├── glide.lock
├── glide.yaml
├── main.go
├── models
│ └── state.go
└── vendor
├── github.com
├── golang.org
├── google.golang.org
└── gopkg.in
在我的main.go中,我导入
import (
"gopkg.in/kataras/iris.v6"
"gopkg.in/kataras/iris.v6/adaptors/httprouter"
"./models"
)
但它大叫它无法找到依赖
main.go:4:2: cannot find package "gopkg.in/kataras/iris.v6" in any of:
/Users/alex/.gvm/gos/go1.8.1/src/gopkg.in/kataras/iris.v6 (from $GOROOT)
/Users/alex/.gvm/pkgsets/go1.8.1/test-api/src/gopkg.in/kataras/iris.v6 (from $GOPATH)
/Users/alex/.gvm/pkgsets/go1.8.1/global/src/gopkg.in/kataras/iris.v6
main.go:5:2: cannot find package "gopkg.in/kataras/iris.v6/adaptors/httprouter" in any of:
/Users/alex/.gvm/gos/go1.8.1/src/gopkg.in/kataras/iris.v6/adaptors/httprouter (from $GOROOT)
/Users/alex/.gvm/pkgsets/go1.8.1/test-api/src/gopkg.in/kataras/iris.v6/adaptors/httprouter (from $GOPATH)
/Users/alex/.gvm/pkgsets/go1.8.1/global/src/gopkg.in/kataras/iris.v6/adaptors/httprouter
它是否忽略了我项目中的供应商文件夹?