Closed Antonboom closed 2 years ago
Hello!
package main import "fmt" func returnFalse() bool { return false } func returnTrue() bool { return true } func main() { isValid := true var i interface{} = 100 switch i.(type) { case int: isValid = returnFalse() default: isValid = returnTrue() } if !isValid { fmt.Println("value changed") } }
▶ ineffassign main.go /Users/anthony/main.go:14:2: ineffectual assignment to isValid
I'm sorry. I didn’t notice which line the linter was pointing to.
Thank u for linter!
Hello!