mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
add warning for deprecatd flags
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
This commit is contained in:
parent
93f925c533
commit
bb5ed45224
1 changed files with 5 additions and 0 deletions
|
@ -803,6 +803,11 @@ func (f *FlagSet) parseOne() (bool, string, error) {
|
|||
f.actual = make(map[string]*Flag)
|
||||
}
|
||||
f.actual[name] = flag
|
||||
for _, n := range flag.Names {
|
||||
if n == fmt.Sprintf("#%s", name) {
|
||||
fmt.Fprintf(f.out(), "Warning: '-%s' is deprecated, it will be removed soon. See usage.\n", name)
|
||||
}
|
||||
}
|
||||
return true, "", nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue