Sign in
go
/
lint
/
d182c9c2b1da993d1a0674a6cb4fa13780b72a68
/
.
/
testdata
/
else.go
blob: d5f6e6c8ac186af171cbbe36a7e5790841de97f3 [
file
] [
log
] [
blame
]
// Test of return+else warning.
// Package pkg ...
package pkg
import "log"
func f(x int) bool {
if x > 0 {
return true
} else {
// MATCH /if.*return.*else.*outdent/
log.Printf("non-positive x: %d", x)
}
return false
}