Compare commits
2 commits
92a4f7720f
...
16c8af386b
Author | SHA1 | Date | |
---|---|---|---|
16c8af386b | |||
|
c5c61dbade |
1 changed files with 8 additions and 5 deletions
|
@ -24,16 +24,19 @@ 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.
|
// logDeprecation prints deprecation hints and returns whether incompatible deprecated options need to be removed.
|
||||||
func logDeprecation(traefikConfiguration interface{}, args []string) bool {
|
func logDeprecation(traefikConfiguration interface{}, arguments []string) bool {
|
||||||
// This part doesn't handle properly a flag defined like this:
|
// This part doesn't handle properly a flag defined like this:
|
||||||
// --accesslog true
|
// --accesslog true
|
||||||
// where `true` could be considered as a new argument.
|
// 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
|
// This is not really an issue with the deprecation loader since it will filter the unknown nodes later in this function.
|
||||||
// function.
|
var args []string
|
||||||
for i, arg := range args {
|
for _, arg := range arguments {
|
||||||
if !strings.Contains(arg, "=") {
|
if !strings.Contains(arg, "=") {
|
||||||
args[i] = arg + "=true"
|
args = append(args, arg+"=true")
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
args = append(args, arg)
|
||||||
}
|
}
|
||||||
|
|
||||||
labels, err := flag.Parse(args, nil)
|
labels, err := flag.Parse(args, nil)
|
||||||
|
|
Loading…
Reference in a new issue