From ae166fd227bf9cd2a0ea5ec1a73e17da648e7310 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Mon, 24 Feb 2025 14:13:58 -0800 Subject: [PATCH] Apply suggestions from code review Co-authored-by: delvh --- modules/setting/config_provider.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/setting/config_provider.go b/modules/setting/config_provider.go index 53dadf55b380b..65030e5e56ab6 100644 --- a/modules/setting/config_provider.go +++ b/modules/setting/config_provider.go @@ -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) } }