Code cleanup - simplify server side code. (#3870)

Fix all the issues reported by `gosimple` tool.
This commit is contained in:
Harshavardhana
2017-03-08 10:00:47 -08:00
committed by GitHub
parent 433225ab0d
commit 47ac410ab0
14 changed files with 21 additions and 52 deletions

View File

@@ -134,10 +134,7 @@ func isLocalStorage(ep *url.URL) bool {
if globalMinioHost != "" && globalMinioPort != "" {
// if --address host:port was specified for distXL we short
// circuit only the endPoint that matches host:port
if net.JoinHostPort(globalMinioHost, globalMinioPort) == ep.Host {
return true
}
return false
return net.JoinHostPort(globalMinioHost, globalMinioPort) == ep.Host
}
// Split host to extract host information.
host, _, err := net.SplitHostPort(ep.Host)