Closed tedyu closed 2 years ago
It appears that Go produces this error when you don't specify the version explicitly.
This works as expected:
go get github.com/pganalyze/pg_query_go/v2@latest
go get github.com/pganalyze/pg_query_go/v2@latest
go get: package github.com/pganalyze/pg_query_go/v2 is in the main module, so can't request version latest
@tedyu Weird - I don't really know why that's not working for you. It works fine here on Go 1.17.
$ go version
go version go1.17.7 linux/amd64
I think this issue should be reopened.
12:38 /tmp $ go version
go version go1.18.3 darwin/amd64
12:40 /tmp $ go get github.com/pganalyze/pg_query_go/v2@latest
go: can only use path@version syntax with 'go get' and 'go install' in module-aware mode
I was following instruction: