github.com/serversong/goreporter@v0.0.0-20200325104552-3cfaf44fd178/linters/staticcheck/testdata/CheckPredeterminedBooleanExprs.go.disabled (about) 1 package pkg 2 3 import "math" 4 5 func fn1() { 6 var x int 7 var y int 8 println(x == 0) // MATCH /x == 0 is always true for all possible values/ 9 println(x == y) // MATCH /x == y is always true for all possible values/ 10 x = 1 11 println(x > 0) // MATCH /x > 0 is always true for all possible values/ 12 f := math.NaN() 13 println(f == f) 14 } 15 16 func fn2(x int) { 17 println(x == 0) 18 }