问:看看ENV, 是不是交叉编译后忘记设置回环境变量了?
go 1.8 版本有workspace
go 1.8 版本以下用的是moudle
package util
import (
"log"
"testing"
)
func TestPrettyPrint(t *testing.T) {
type args struct {
arr [][]string
}
tests := []struct {
name string
args args
}{
{
name: "normal",
args: args{
arr: [][]string{
{"te", "test", "sdf"},
{"te11232", "test123123", "1232123"},
},
},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
log.Panic(tt.args.arr)
})
}
log.Panic("---------------")
}
package util
import (
"log"
"testing"
)
func TestFile(t *testing.T) {
log.Panic("---------------测试")
}