return 2
}
+ // Load the config twice -- once without loading deprecated
+ // keys/files, once with -- and then compare the two resulting
+ // configs. This reveals whether the deprecated keys/files
+ // have any effect on the final configuration.
+ //
+ // If they do, show the operator how to update their config
+ // such that the deprecated keys/files are superfluous and can
+ // be deleted.
loader.SkipDeprecated = true
+ loader.SkipLegacy = true
withoutDepr, err := loader.Load()
if err != nil {
return 1
}
loader.SkipDeprecated = false
+ loader.SkipLegacy = false
withDepr, err := loader.Load()
if err != nil {
return 1