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
This is picking up: microsoft/vscode-go#1242
I found an issue in godef where the first argument when ranging over a slice will be incorrect when you omit the value (i.e. use the index only).
Consider the following program:
package main import ( "fmt" ) func main() { s := []string{"a", "b", "c"} for index, char := range s { fmt.Println(index, char) } for index := range s { fmt.Println(index) } }
I will get int, string for the first loop, but bool for the second one:
int, string
bool
frederik@fr-xps:~/projects/go/src/github.com/m90/test$ cat main.go package main import ( "fmt" ) func main() { s := []string{"a", "b", "c"} for index, char := range s { fmt.Println(index, char) } for index := range s { fmt.Println(index) } } frederik@fr-xps:~/projects/go/src/github.com/m90/test$ godef -o 84 -f main.go -t main.go:9:6 index int frederik@fr-xps:~/projects/go/src/github.com/m90/test$ godef -o 89 -f main.go -t main.go:9:13 char string frederik@fr-xps:~/projects/go/src/github.com/m90/test$ godef -o 144 -f main.go -t main.go:12:6 index bool
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This is picking up: microsoft/vscode-go#1242
I found an issue in godef where the first argument when ranging over a slice will be incorrect when you omit the value (i.e. use the index only).
Consider the following program:
I will get
int, string
for the first loop, butbool
for the second one:The text was updated successfully, but these errors were encountered: