pganalyze / pg_query_go

Go library to parse and normalize SQL queries using the PostgreSQL query parser
BSD 3-Clause "New" or "Revised" License
663 stars 79 forks source link

Encountered `import cycle not allowed` when running sample #55

Open tedyu opened 2 years ago

tedyu commented 2 years ago

I am using

go version go1.16.13 linux/amd64

When running https://github.com/pganalyze/pg_query_go/#parsing-a-query-into-go-structs , I got the following error:

package command-line-arguments
    imports github.com/pganalyze/pg_query_go/v2
    imports github.com/pganalyze/pg_query_go/v2: import cycle not allowed
lfittl commented 2 years ago

Its not clear why this would occur - could it be that you were using an outdated version? (per #57)