mirror of
https://github.com/minio/minio.git
synced 2025-11-09 21:49:46 -05:00
simplifying if-else chains to switches (#6208)
This commit is contained in:
@@ -398,14 +398,16 @@ func getValidServerConfig(serverConfigs []serverConfig, errs []error) (scv serve
|
||||
// seen. See example above for
|
||||
// clarity.
|
||||
continue
|
||||
} else if j < i && serverConfigs[i].ConfigDiff(&serverConfigs[j]) == "" {
|
||||
}
|
||||
if j < i && serverConfigs[i].ConfigDiff(&serverConfigs[j]) == "" {
|
||||
// serverConfigs[i] is equal to
|
||||
// serverConfigs[j], update
|
||||
// serverConfigs[j]'s counter since it
|
||||
// is the lower index.
|
||||
configCounter[j]++
|
||||
break
|
||||
} else if j == i {
|
||||
}
|
||||
if j == i {
|
||||
// serverConfigs[i] is equal to no
|
||||
// other value seen before. It is
|
||||
// unique so far.
|
||||
|
||||
Reference in New Issue
Block a user