From 7dff742444e8d064ab3465d4e4d1f0a4cb8ac453 Mon Sep 17 00:00:00 2001 From: skiffer-git <44203734@qq.com> Date: Wed, 3 Apr 2024 18:08:36 +0800 Subject: [PATCH] Adjust configuration settings --- pkg/common/config/parse.go | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/pkg/common/config/parse.go b/pkg/common/config/parse.go index e1bcb2d96..28e9f5db6 100644 --- a/pkg/common/config/parse.go +++ b/pkg/common/config/parse.go @@ -62,7 +62,7 @@ func GetProjectRoot() (string, error) { return projectRoot, nil } -func GetOptionsByNotification(cfg NotificationConf) msgprocessor.Options { +func GetOptionsByNotification(cfg NotificationConfig) msgprocessor.Options { opts := msgprocessor.NewOptions() if cfg.UnreadCount { @@ -107,23 +107,3 @@ func initConfig(config any, configName, configFolderPath string) error { return nil } - -func InitConfig(config *GlobalConfig, configFolderPath string) (err error) { - if configFolderPath == "" { - envConfigPath := os.Getenv("OPENIMCONFIG") - if envConfigPath != "" { - configFolderPath = envConfigPath - } else { - configFolderPath, err = GetDefaultConfigPath() - if err != nil { - return err - } - } - } - - if err := initConfig(config, FileName, configFolderPath); err != nil { - return err - } - - return initConfig(&config.Notification, NotificationFileName, configFolderPath) -}