猿问

去测试 foo - 找不到包 foo

我有这个目录结构:


https://github.com/netjet-chrome-extension/netjet-mono/tree/master/examples/projects/golang


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


#!/usr/bin/env bash


cd "$(dirname "$BASH_SOURCE")"

export GOPATH="$PWD"

go test sourcegraph_go_selenium

但我收到此错误:


无法加载包:包 sourcegraph_go_selenium:在以下任何一个中都找不到包“sourcegraph_go_selenium”:/usr/lib/go-1.10/src/sourcegraph_go_selenium(来自 $GOROOT)/home/oleg/codes/netjet/netjet-mono/examples /projects/golang/src/sourcegraph_go_selenium(来自 $GOPATH)


GOPATH设置正确,为什么找不到sourcegraph_go_selenium包?这个包裹就在那里,在src/sourcegraph_go_selenium...?


慕容708150
浏览 116回答 1
1回答

慕桂英546537

尝试这个:go test sourcegraph_go_selenium/...
随时随地看视频慕课网APP

相关分类

Go
我要回答