In case you're looking for something Postgres syntax compatible, and find cgo acceptable: https://github.com/lfittl/pg_query_go
(this uses the actual Postgres parser wrapped into a library)
(this uses the actual Postgres parser wrapped into a library)