refactor: clean code

This commit is contained in:
Fu Diwei
2024-11-09 20:29:13 +08:00
parent 551b06b4e8
commit 94579d65c4
3 changed files with 72 additions and 16 deletions

View File

@@ -193,19 +193,3 @@ func getMailNotifier(conf map[string]any) (notifyPackage.Notifier, error) {
return rs, nil
}
func getString(conf map[string]any, key string) string {
if _, ok := conf[key]; !ok {
return ""
}
return conf[key].(string)
}
func getBool(conf map[string]any, key string) bool {
if _, ok := conf[key]; !ok {
return false
}
return conf[key].(bool)
}