import (
"testing" 

"github.com/stretchr/testify/assert" 
) 

当我尝试尝试运行“走出去测试”我得到错误信息:

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。但是,我把这个作为一个导入,所以我不知道它为什么会抛出这个错误。有什么想法吗?

2017-02-15 jj1111

+4

你运行了'go get github.com/stretchr/testify/assert'来获得断言包吗? –

+0

ahhhhhhh nope! Golang的全新品牌,除了一周前我做过之外,我忘记了。谢谢! –