From a0e238043847ecbd9e4c6e433a922d4fd0382ef7 Mon Sep 17 00:00:00 2001 From: Abhinav Gupta Date: Fri, 10 Sep 2021 09:27:06 -0700 Subject: [PATCH] CI: Test with Go 1.17 (#1009) Add Go 1.17 to the list of versions we test with. `gofmt` all files to add the new `//go:build` directives meant to replace `// +build`. This supersedes the Go version upgrade in #999. That PR will be narrowed down just to Windows support. --- .github/workflows/go.yml | 4 ++-- global_go112.go | 1 + global_prego112.go | 1 + tools/tools.go | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index d174d4129..24249d535 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -13,9 +13,9 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - go: ["1.15.x", "1.16.x"] + go: ["1.15.x", "1.16.x", "1.17.x"] include: - - go: 1.16.x + - go: 1.17.x latest: true steps: diff --git a/global_go112.go b/global_go112.go index 6b5dbda80..fb11f7390 100644 --- a/global_go112.go +++ b/global_go112.go @@ -19,6 +19,7 @@ // THE SOFTWARE. // See #682 for more information. +//go:build go1.12 // +build go1.12 package zap diff --git a/global_prego112.go b/global_prego112.go index d3ab9af93..e452fd53b 100644 --- a/global_prego112.go +++ b/global_prego112.go @@ -19,6 +19,7 @@ // THE SOFTWARE. // See #682 for more information. +//go:build !go1.12 // +build !go1.12 package zap diff --git a/tools/tools.go b/tools/tools.go index e12570210..3c855c17d 100644 --- a/tools/tools.go +++ b/tools/tools.go @@ -18,6 +18,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +//go:build tools // +build tools package tools