add cobra
add cobra
This commit is contained in:
19
data/config/test_def.go
Normal file
19
data/config/test_def.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"os"
|
||||
"strings"
|
||||
)
|
||||
|
||||
const (
|
||||
test_file = `
|
||||
`
|
||||
)
|
||||
|
||||
//判断是否在测试环境下使用
|
||||
func IsRunTesting() bool {
|
||||
if len(os.Args) > 1 {
|
||||
return strings.HasPrefix(os.Args[1], "-test")
|
||||
}
|
||||
return false
|
||||
}
|
||||
Reference in New Issue
Block a user