【发布时间】:2019-05-03 10:36:42
【问题描述】:
我使用以下命令对特定包运行测试
go test fts -run run_test.go
无法加载包:包 fts:在以下任何位置都找不到包“fts”:/usr/local/Cellar/go/1.11.1/libexec/src/integration(来自 $GOROOT)/Users/i055555/ go/src/fts(来自 $GOPATH)
而且包裹看起来像
gitproj/
|---- fts
|---- -command
|---- -run.go
|---- -run_test.go
|---- internal
|---- -fs.go
|---- -tb.go
|---- -tb_test.go
main.go
【问题讨论】:
-
如果它不在您的 GOPATH 中,请尝试使用相对路径运行它,例如
go test ./fts/command
标签: go