Go 转到测试foo-找不到包foo

Go 转到测试foo-找不到包foo,go,Go,我有以下目录结构: 我尝试运行test.sh,它包括: #!/usr/bin/env bash cd "$(dirname "$BASH_SOURCE")" export GOPATH="$PWD" go test sourcegraph_go_selenium 但我得到了这个错误: 无法加载包:包sourcegraph\u go\u Seleniu:找不到 将“sourcegraph_go_selenium”打包到以下任意一种中: /usr/lib/go-1.10/src/sourceg

我有以下目录结构:

我尝试运行test.sh,它包括:

#!/usr/bin/env bash

cd "$(dirname "$BASH_SOURCE")"
export GOPATH="$PWD"
go test sourcegraph_go_selenium
但我得到了这个错误:

无法加载包:包sourcegraph\u go\u Seleniu:找不到 将“sourcegraph_go_selenium”打包到以下任意一种中: /usr/lib/go-1.10/src/sourcegraph\u go\u selenium(来自$GOROOT) /home/oleg/codes/netjet/netjet mono/examples/projects/golang/src/sourcegraph\u go\u selenium (来自$GOPATH)

GOPATH设置正确,为什么找不到
sourcegraph\u go\u selenium
包?这个软件包就在那里,在
src/sourcegraph\u go\u selenium
中……?

试试这个:

go test sourcegraph_go_selenium/...