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: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Gabriel Aszalos 2017-10-17 19:57:01 +02:00 committed by Ian Lance Taylor
parent 58cf881c1c
commit 5f740d6875
1 changed files with 1 additions and 5 deletions

View File

@ -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