Compare commits

..

No commits in common. "16c8af386b4ab0ab615a3717cb7609475e92687b" and "92a4f7720f88cdebd126a123ac953f1b9a4de559" have entirely different histories.

View file

@ -24,19 +24,16 @@ func (d DeprecationLoader) Load(args []string, cmd *cli.Command) (bool, error) {
}
// logDeprecation prints deprecation hints and returns whether incompatible deprecated options need to be removed.
func logDeprecation(traefikConfiguration interface{}, arguments []string) bool {
func logDeprecation(traefikConfiguration interface{}, args []string) bool {
// This part doesn't handle properly a flag defined like this:
// --accesslog true
// where `true` could be considered as a new argument.
// This is not really an issue with the deprecation loader since it will filter the unknown nodes later in this function.
var args []string
for _, arg := range arguments {
// This is not really an issue with the deprecation loader since it will filter the unknown nodes later in this
// function.
for i, arg := range args {
if !strings.Contains(arg, "=") {
args = append(args, arg+"=true")
continue
args[i] = arg + "=true"
}
args = append(args, arg)
}
labels, err := flag.Parse(args, nil)