add warning for deprecatd flags

Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
Upstream-commit: bb5ed452241c37ee9f2f3ebd02a2a5e1764334ad
Component: engine
This commit is contained in:
Victor Vieux
2014-03-03 19:57:05 +00:00
parent 60e9c4cdca
commit b49fc1301e

View File

@ -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
}