mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
simplifying if-else chains to switches (#6208)
This commit is contained in:
@@ -94,13 +94,14 @@ type Console interface {
|
||||
}
|
||||
|
||||
func consoleLog(console Console, msg string, args ...interface{}) {
|
||||
if jsonFlag {
|
||||
switch {
|
||||
case jsonFlag:
|
||||
// Strip escape control characters from json message
|
||||
msg = ansiRE.ReplaceAllLiteralString(msg, "")
|
||||
console.json(msg, args...)
|
||||
} else if quiet {
|
||||
case quiet:
|
||||
console.quiet(msg, args...)
|
||||
} else {
|
||||
default:
|
||||
console.pretty(msg, args...)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user