Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: delvh <dev.lh@web.de>
  • Loading branch information
lunny and delvh authored Feb 24, 2025
1 parent 1f62ea3 commit ae166fd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/setting/config_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -324,9 +324,10 @@ func LogStartupProblem(skip int, level log.Level, format string, args ...any) {
StartupProblems = append(StartupProblems, msg)
}

// deprecatedSetting creates a warning about a setting that will be removed in the near future
func deprecatedSetting(rootCfg ConfigProvider, oldSection, oldKey, newSection, newKey, version string) {
if rootCfg.Section(oldSection).HasKey(oldKey) {
LogStartupProblem(1, log.ERROR, "Deprecation: config option `[%s].%s` presents, please use `[%s].%s` instead because this fallback will be removed in %s", oldSection, oldKey, newSection, newKey, version)
LogStartupProblem(1, log.ERROR, "Deprecation: config option `[%s].%s` is present, please use `[%s].%s` instead. This fallback will be removed in %s", oldSection, oldKey, newSection, newKey, version)
}
}

Expand Down

0 comments on commit ae166fd

Please sign in to comment.