From adeffc74ae226db963ef82cb85017a58daceca48 Mon Sep 17 00:00:00 2001 From: Julien Desgats Date: Tue, 22 Mar 2022 11:03:07 +0000 Subject: [PATCH 1/2] Fix workflow syntax when more than one file fail format check Previously the files were expanded to multiple arguments to `test` generating confusing error messages. --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5ae9ecd..89b5fcf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,7 +17,7 @@ jobs: - name: Check lint # gofmt doesn't report any changes - run: test -z $(gofmt -l ./ | tee /dev/stderr) + run: test -z "$(gofmt -l ./ | tee /dev/stderr)" - name: Run tests run: go test ./... From 8e82254142ec7548441dae620b16f8c574a581bc Mon Sep 17 00:00:00 2001 From: Julien Desgats Date: Tue, 22 Mar 2022 11:04:11 +0000 Subject: [PATCH 2/2] Add build constraints for the Go 1.16+ format This is reported by `gofmt`. --- dup_fd.go | 1 + env_syscalls.go | 1 + 2 files changed, 2 insertions(+) diff --git a/dup_fd.go b/dup_fd.go index 5741269..9f7a672 100644 --- a/dup_fd.go +++ b/dup_fd.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package tableflip diff --git a/env_syscalls.go b/env_syscalls.go index 7cefac8..a5d395f 100644 --- a/env_syscalls.go +++ b/env_syscalls.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package tableflip