尝试运行用Go编写的测试时出现以下错误。我安装了Golang和dep。我是Go的新手,我不确定这是什么问题。有人可以帮我吗?
xxxx-dxxxx:test xxxx$ go test
# _/Users/xxxx/dev/xxxx/test/xxxx/test
application_cluster_test.go:10:2: cannot find package "github.com/stretchr/testify/assert" in any of:
/usr/local/Cellar/go/1.10.3/libexec/src/github.com/stretchr/testify/assert (from $GOROOT)
/Users/xxxx/go/src/github.com/stretchr/testify/assert (from $GOPATH)
FAIL _/Users/xxxx/dev/xxxx/test/xxxx/test [setup failed]
答案 0 :(得分:0)
您是否运行过 go get 将依赖项下拉到路径中?
go get github.com/stretchr/testify/assert