Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1,My gopath like this
- >echo $GOPATH
- /home/my/gopath,/home/my/IdeaProjects/XServer/src
- 2,and I have a project with directory structure like this:
- /home/my/IdeaProjects/XServer
- └── src
- ├── base
- │ ├── http
- │ ├── impl
- │ └── logger
- ├── comment
- │ ├── create(a test file under this directory)
- │ ├── delete
- │ ├── retrieve
- │ └── update
- ├── db
- ├── helper
- ├── util
- └── valid
- 3,and a test file dao_test.go is under /home/my/IdeaProjects/XServer/src/comment/create
- 4,and when I run: go test in directory /home/my/IdeaProjects/XServer/src/comment/create,got these errors:
- CreateAction.go:13:2: cannot find package "base" in any of:
- /home/my/go/src/pkg/base (from $GOROOT)
- /home/my/go/gopath,/home/my/IdeaProjects/XServer/src (from $GOPATH)
- CreateDao.go:11:2: cannot find package "base/impl" in any of:
- /home/my/go/src/pkg/base/impl (from $GOROOT)
- /home/my/go/gopath,/home/my/IdeaProjects/XServer/src (from $GOPATH)
- CreateAction.go:11:2: cannot find package "comment" in any of:
- /home/my/go/src/pkg/comment (from $GOROOT)
- /home/my/go/gopath,/home/my/IdeaProjects/XServer/src (from $GOPATH)
- CreateDao.go:13:2: cannot find package "db" in any of:
- /home/my/go/src/pkg/db (from $GOROOT)
- /home/my/go/gopath,/home/my/IdeaProjects/XServer/src (from $GOPATH)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement