Remove more TODOs

- Some of them don't make sense anymore
- Some are deprecated and removed from the engine since a few versions
  already.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
Vincent Demeester
2018-04-23 14:57:29 +02:00
parent 58173b3c69
commit 740d260cd2
4 changed files with 4 additions and 24 deletions

View File

@ -176,21 +176,6 @@ func prettyPrintInfo(dockerCli command.Cli, info types.Info) error {
for _, lbl := range info.Labels {
fmt.Fprintln(dockerCli.Out(), " "+lbl)
}
// TODO: Engine labels with duplicate keys has been deprecated in 1.13 and will be error out
// after 3 release cycles (17.12). For now, a WARNING will be generated. The following will
// be removed eventually.
labelMap := map[string]string{}
for _, label := range info.Labels {
stringSlice := strings.SplitN(label, "=", 2)
if len(stringSlice) > 1 {
// If there is a conflict we will throw out a warning
if v, ok := labelMap[stringSlice[0]]; ok && v != stringSlice[1] {
fmt.Fprintln(dockerCli.Err(), "WARNING: labels with duplicate keys and conflicting values have been deprecated")
break
}
labelMap[stringSlice[0]] = stringSlice[1]
}
}
}
fmt.Fprintln(dockerCli.Out(), "Experimental:", info.ExperimentalBuild)