You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
package config
|
|
|
|
|
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
"strings"
|
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
|
|
|
testFile = `
|
|
|
|
serial_number : "1.0" #版本号
|
|
|
|
service_name : #服务名
|
|
|
|
service_displayname : #服务显示名
|
|
|
|
sercice_desc : #服务描述
|
|
|
|
is_dev : false # 是否开发者模式
|
|
|
|
out_dir : ./db # 输出目录
|
|
|
|
singular_table : false # 单表模式:true:禁用表名复数,false:采用表明复数 参考:gorm.SingularTable
|
|
|
|
simple : true #简单输出
|
|
|
|
isJsonTag : true #是否打json标记
|
|
|
|
mysql_info:
|
|
|
|
host : 127.0.0.1
|
|
|
|
port : 3306
|
|
|
|
username : root
|
|
|
|
password : qwer
|
|
|
|
database : oauth_db
|
|
|
|
`
|
|
|
|
)
|
|
|
|
|
|
|
|
// IsRunTesting Determine whether to use it in a test environment.判断是否在测试环境下使用
|
|
|
|
func IsRunTesting() bool {
|
|
|
|
if len(os.Args) > 1 {
|
|
|
|
return strings.HasPrefix(os.Args[1], "-test")
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|