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
I wrote that code, and I did not understand why path was empty, although findDev() returns a non-empty path:
path
findDev()
func getDeviceFromPath(path string) (*evdev.InputDevice, error) { if path == "" { path, err := findDev() // "path" of outer block gets overwritten if err != nil { return nil, err } fmt.Printf("Using device %q\n", path) } sourceDev, err := evdev.Open(path)
I would like to see a warning in vet, when I overwrite a variable from the outer scope.
vet
This is a common mistake for people new to Go, but even people with experience sometimes do that mistake.
@firelizzard18 had some ideas about that new analyzer: golang/vscode-go#3674 (comment)
The text was updated successfully, but these errors were encountered:
related: #377
Sorry, something went wrong.
see #22582 and #29260
No branches or pull requests
I wrote that code, and I did not understand why
path
was empty, althoughfindDev()
returns a non-empty path:I would like to see a warning in
vet
, when I overwrite a variable from the outer scope.This is a common mistake for people new to Go, but even people with experience sometimes do that mistake.
@firelizzard18 had some ideas about that new analyzer: golang/vscode-go#3674 (comment)
The text was updated successfully, but these errors were encountered: