add cobra

add cobra
This commit is contained in:
xiexiaojun
2019-05-05 21:13:15 +08:00
parent 21a054c9c7
commit 03a29cc432
6 changed files with 199 additions and 0 deletions

19
data/config/test_def.go Normal file
View 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
}