diff --git a/benchmark_test.go b/benchmark_test.go index d9fe289d..18d5748c 100644 --- a/benchmark_test.go +++ b/benchmark_test.go @@ -1,3 +1,6 @@ +//go:build cgo +// +build cgo + package pg_query_test import ( diff --git a/fingerprint_test.go b/fingerprint_test.go index 81940f84..b28e1b1e 100644 --- a/fingerprint_test.go +++ b/fingerprint_test.go @@ -1,3 +1,6 @@ +//go:build cgo +// +build cgo + package pg_query_test import ( diff --git a/makefuncs.go b/makefuncs.go index a721af6e..cea7ec17 100644 --- a/makefuncs.go +++ b/makefuncs.go @@ -8,10 +8,10 @@ func MakeAConstStrNode(str string, location int32) *Node { return &Node{ Node: &Node_AConst{ AConst: &A_Const{ - Val: &A_Const_Sval { + Val: &A_Const_Sval{ Sval: &String{Sval: str}, }, - Isnull: false, + Isnull: false, Location: location, }, }, @@ -26,7 +26,7 @@ func MakeAConstIntNode(ival int64, location int32) *Node { return &Node{ Node: &Node_AConst{ AConst: &A_Const{ - Val: &A_Const_Ival { + Val: &A_Const_Ival{ Ival: &Integer{Ival: int32(ival)}, }, Isnull: false, diff --git a/normalize_test.go b/normalize_test.go index 16001244..bccc015f 100644 --- a/normalize_test.go +++ b/normalize_test.go @@ -1,3 +1,6 @@ +//go:build cgo +// +build cgo + package pg_query_test import ( diff --git a/parse_test.go b/parse_test.go index 12ccd77f..0d92890d 100644 --- a/parse_test.go +++ b/parse_test.go @@ -1,3 +1,6 @@ +//go:build cgo +// +build cgo + package pg_query_test import ( diff --git a/parser/doc.go b/parser/doc.go new file mode 100644 index 00000000..25e48969 --- /dev/null +++ b/parser/doc.go @@ -0,0 +1,2 @@ +// Package parser includes the actual parsing logic using cgo to access libpg_query. +package parser diff --git a/pg_query.go b/pg_query.go index ef7105c9..d787a8a4 100644 --- a/pg_query.go +++ b/pg_query.go @@ -1,3 +1,6 @@ +//go:build cgo +// +build cgo + package pg_query import (