You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You probably have an old gofmt binary somewhere. That code snippet is formatted correctly with Go1.18's gofmt. That error is what you got on the old one, that didn't support type parameters.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I have written some code using go generics which is recently introduced in 1.18
While formatting the code using gofmt we're getting error as below
Error : sample.go:26:21: expected '(', found '['
Sample generic function :
The text was updated successfully, but these errors were encountered: