Commit 0fbaf6ca authored by Iskander Sharipov's avatar Iskander Sharipov Committed by Brad Fitzpatrick

math,net: omit explicit true tag expr in switch

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: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 328adf9d
......@@ -43,7 +43,7 @@ func sinh(x float64) float64 {
}
var temp float64
switch true {
switch {
case x > 21:
temp = Exp(x) * 0.5
......
......@@ -222,7 +222,7 @@ func (ip IP) DefaultMask() IPMask {
if ip = ip.To4(); ip == nil {
return nil
}
switch true {
switch {
case ip[0] < 0x80:
return classAMask
case ip[0] < 0xC0:
......
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