Merge "client: use index expression over rename map"

This commit is contained in:
Mathieu Lonjaret 2014-11-10 16:43:19 +00:00 committed by Gerrit Code Review
commit 1d0ad00bdc
1 changed files with 7 additions and 9 deletions

View File

@ -194,16 +194,14 @@ func printConfigChangeHelp(conf jsonconfig.Obj) {
oldConfig := false
configChangedMsg := fmt.Sprintf("The client configuration file (%s) keys have changed.\n", osutil.UserClientConfigPath())
for _, unknown := range conf.UnknownKeys() {
for k, v := range rename {
if unknown == k {
if v != "" {
configChangedMsg += fmt.Sprintf("%q should be renamed %q.\n", k, v)
} else {
configChangedMsg += fmt.Sprintf("%q should be removed.\n", k)
}
oldConfig = true
break
v, ok := rename[unknown]
if ok {
if v != "" {
configChangedMsg += fmt.Sprintf("%q should be renamed %q.\n", unknown, v)
} else {
configChangedMsg += fmt.Sprintf("%q should be removed.\n", unknown)
}
oldConfig = true
}
}
if oldConfig {