feat: omc界面配置参数添加信令跟踪开关

This commit is contained in:
TsMask
2025-06-10 18:52:03 +08:00
parent 9be1b8fb3e
commit 4fe372f418
6 changed files with 184 additions and 97 deletions

View File

@@ -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)