Commit 5f740d68 authored by Gabriel Aszalos's avatar Gabriel Aszalos Committed by Ian Lance Taylor

flag: simplify switch-case in isZeroValue

Simplifies the switch statement in the isZeroValue function by merging
the case branches.

Change-Id: I5b27939b62808dadac0cef632567b17e0e2b9a1d
Reviewed-on: https://go-review.googlesource.com/71390
Run-TryBot: Gabriel Aszalos <gabriel.aszalos@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
parent 58cf881c
......@@ -400,11 +400,7 @@ func isZeroValue(flag *Flag, value string) bool {
}
switch value {
case "false":
return true
case "":
return true
case "0":
case "false", "", "0":
return true
}
return false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment