We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Case 2 would cause an error in Nilaway. IMO, it looks like a false positive case.
package main import "fmt" func main() { var data []int // case 1: OK if len(data) == 1 { fmt.Println(data[0]) } // case 2: Not OK length := len(data) if length == 1 { fmt.Println(data[0]) } } // error: Potential nil panic detected. Observed nil flow from source to dereference point: // unassigned variable `data` sliced into
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Case 2 would cause an error in Nilaway. IMO, it looks like a false positive case.
The text was updated successfully, but these errors were encountered: