Performed `switch true {}` => `switch {}` replacement.
Found using https://go-critic.github.io/overview.html#switchTrue-ref
Change-Id: Ib39ea98531651966a5a56b7bd729b46e4eeb7f7c
Reviewed-on: https://go-review.googlesource.com/123378
Run-TryBot: Iskander Sharipov <iskander.sharipov@intel.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
}
var temp float64
- switch true {
+ switch {
case x > 21:
temp = Exp(x) * 0.5
if ip = ip.To4(); ip == nil {
return nil
}
- switch true {
+ switch {
case ip[0] < 0x80:
return classAMask
case ip[0] < 0xC0: