我的导入如下所示:
import (
"testing"
"github.com/stretchr/testify/assert"
)
当我尝试运行“go test”时,我收到错误消息:
cannot find package "github.com/stretchr/testify/assert" in any of:
/Users/[username]/go/src/github.com/[group_name]/[project_name]/vendor/github.com/stretchr/testify/assert (vendor tree)
/usr/local/go/src/github.com/stretchr/testify/assert (from $GOROOT)
/Users/[username]/go/src/github.com/stretchr/testify/assert (from $GOPATH)
FAIL github.com/[group_name]/[project_name]/lib/briteverify [setup failed]
所以看起来最后一行是问题所在,它在.../lib/briteverify 中说它找不到 github.com/stretchr/testify/assert。但是,我将此作为导入,所以我不知道为什么它会抛出此错误。有什么想法吗?