Fix go1.11 vet shadow errors (#6555)

master
Pontus Leitzler 6 years ago committed by kannappanr
parent c05ced08bb
commit 274b35154c
  1. 2
      cmd/admin-handlers.go
  2. 2
      cmd/common-main.go

@ -675,7 +675,7 @@ func (a adminAPIHandlers) GetConfigKeysHandler(w http.ResponseWriter, r *http.Re
continue
}
val := gjson.Get(configStr, key)
if j, err := sjson.Set(newConfigStr, normalizeJSONKey(key), val.Value()); err == nil {
if j, ierr := sjson.Set(newConfigStr, normalizeJSONKey(key), val.Value()); ierr == nil {
newConfigStr = j
}
}

@ -161,7 +161,7 @@ func handleCommonEnvVars() {
globalDomainName, globalIsEnvDomainName = os.LookupEnv("MINIO_DOMAIN")
if globalDomainName != "" {
if _, ok := dns2.IsDomainName(globalDomainName); !ok {
if _, ok = dns2.IsDomainName(globalDomainName); !ok {
logger.Fatal(uiErrInvalidDomainValue(nil).Msg("Unknown value `%s`", globalDomainName), "Invalid MINIO_DOMAIN environment variable")
}
}

Loading…
Cancel
Save