diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index e83e0f2d5e..7bb5b2b222 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,5 +1,5 @@ # [Choice] Go version (use -bullseye variants on local arm64/Apple Silicon): 1, 1.16, 1.17, 1-bullseye, 1.16-bullseye, 1.17-bullseye, 1-buster, 1.16-buster, 1.17-buster -ARG VARIANT=1.18-bullseye +ARG VARIANT=1.19-bullseye FROM mcr.microsoft.com/vscode/devcontainers/go:0-${VARIANT} # [Optional] If your requirements rarely change, uncomment this section to add them to the image. diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index a3236e63d0..5c731784db 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -6,7 +6,7 @@ services: context: .. dockerfile: .devcontainer/Dockerfile args: - VARIANT: 1.18-bullseye + VARIANT: 1.19-bullseye volumes: - ..:/workspace:cached diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d8ebb843d9..c74df4eb42 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,7 +34,7 @@ jobs: - uses: actions/setup-go@v3 with: - go-version: '1.18' + go-version: '1.19' - name: install ./... run: go install ./... diff --git a/examples/batch/postgresql/batch.go b/examples/batch/postgresql/batch.go index 2467a4ac19..1fd9849b2c 100644 --- a/examples/batch/postgresql/batch.go +++ b/examples/batch/postgresql/batch.go @@ -2,6 +2,7 @@ // versions: // sqlc v1.14.0 // source: batch.go + package batch import ( diff --git a/go.mod b/go.mod index 972500380c..45d8651fd4 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/kyleconroy/sqlc -go 1.18 +go 1.19 require ( github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20220626175859-9abda183db8e diff --git a/internal/codegen/golang/templates/template.tmpl b/internal/codegen/golang/templates/template.tmpl index ad7ff4fd11..b155516e9f 100644 --- a/internal/codegen/golang/templates/template.tmpl +++ b/internal/codegen/golang/templates/template.tmpl @@ -193,6 +193,7 @@ import ( // versions: // sqlc {{.SqlcVersion}} // source: {{.SourceName}} + package {{.Package}} import ( diff --git a/internal/endtoend/testdata/batch/postgresql/pgx/go/batch.go b/internal/endtoend/testdata/batch/postgresql/pgx/go/batch.go index 7a6cab1dc5..0773a2c68c 100644 --- a/internal/endtoend/testdata/batch/postgresql/pgx/go/batch.go +++ b/internal/endtoend/testdata/batch/postgresql/pgx/go/batch.go @@ -2,6 +2,7 @@ // versions: // sqlc v1.14.0 // source: batch.go + package querytest import ( diff --git a/internal/endtoend/testdata/batch_imports/postgresql/pgx/go/batch.go b/internal/endtoend/testdata/batch_imports/postgresql/pgx/go/batch.go index a9d76a5c52..96ae87d125 100644 --- a/internal/endtoend/testdata/batch_imports/postgresql/pgx/go/batch.go +++ b/internal/endtoend/testdata/batch_imports/postgresql/pgx/go/batch.go @@ -2,6 +2,7 @@ // versions: // sqlc v1.14.0 // source: batch.go + package querytest import (