feat: omc界面配置参数添加信令跟踪开关
This commit is contained in:
@@ -30,7 +30,7 @@ func initFlag() {
|
||||
pflag.String("env", "prod", "Specify Run Environment Configuration local or prod")
|
||||
// --c /etc/restconf.yaml
|
||||
// -c /etc/restconf.yaml
|
||||
pflag.StringP("config", "c", "./etc/restconf.yaml", "Specify Configuration File")
|
||||
pflag.StringP("config", "c", "/usr/local/omc/etc/restconf.yaml", "Specify Configuration File")
|
||||
// --version
|
||||
// -V
|
||||
pVersion := pflag.BoolP("version", "V", false, "Output program version")
|
||||
@@ -171,6 +171,13 @@ func Get(key string) any {
|
||||
return cfg.Get(key)
|
||||
}
|
||||
|
||||
// Set 设置配置信息
|
||||
//
|
||||
// Set("redis.defaultDataSourceName", "std")
|
||||
func Set(key string, value any) {
|
||||
cfg.Set(key, value)
|
||||
}
|
||||
|
||||
// GetAssetsDirFS 访问程序内全局资源访问
|
||||
func GetAssetsDirFS() embed.FS {
|
||||
return cfg.Get("AssetsDir").(embed.FS)
|
||||
|
||||
Reference in New Issue
Block a user