1
0
Fork 0
forked from forgejo/forgejo

Revert "[GITEA] do not use deprecatedSettingFatal for cosmetic reasons"

This reverts commit 2de8602855.
This commit is contained in:
Earl Warren 2023-07-30 07:42:38 +02:00
parent df5200e814
commit f4fcdaba8c
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
3 changed files with 7 additions and 32 deletions

View file

@ -322,6 +322,12 @@ func deprecatedSetting(rootCfg ConfigProvider, oldSection, oldKey, newSection, n
}
}
func deprecatedSettingFatal(rootCfg ConfigProvider, oldSection, oldKey, newSection, newKey, version string) {
if rootCfg.Section(oldSection).HasKey(oldKey) {
log.Fatal("Deprecated fallback `[%s]` `%s` present. Use `[%s]` `%s` instead. This fallback will be/has been removed in %s. Shutting down", oldSection, oldKey, newSection, newKey, version)
}
}
// deprecatedSettingDB add a hint that the configuration has been moved to database but still kept in app.ini
func deprecatedSettingDB(rootCfg ConfigProvider, oldSection, oldKey string) {
if rootCfg.Section(oldSection).HasKey(oldKey) {