From 02e8aff16e653a6639ae0c91b566abd4a0129a4f Mon Sep 17 00:00:00 2001 From: Daniel Canter Date: Tue, 5 Apr 2022 18:07:44 -0700 Subject: [PATCH 1/2] Assign ErrPipeListenerClosed to net.ErrClosed This error used to just be a `errors.New` with the text exactly matching the "use of closed network connection" that you'd get from the Go stdlib. Now that that error was exported as `net.ErrClosed` in Go 1.16 we should be able to swap to this safely, and anyone who relied on checking the string explicitly should still be fine. Signed-off-by: Daniel Canter --- pipe.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pipe.go b/pipe.go index 58fa5f83..1acb2014 100644 --- a/pipe.go +++ b/pipe.go @@ -89,8 +89,7 @@ const ( var ( // ErrPipeListenerClosed is returned for pipe operations on listeners that have been closed. - // This error should match net.errClosing since docker takes a dependency on its text. - ErrPipeListenerClosed = errors.New("use of closed network connection") + ErrPipeListenerClosed = net.ErrClosed errPipeWriteClosed = errors.New("pipe has been closed for write") ) From 708df50a26a45a9d0477209fd01fa0d39f21b3c9 Mon Sep 17 00:00:00 2001 From: Daniel Canter Date: Wed, 6 Apr 2022 01:51:29 -0700 Subject: [PATCH 2/2] CI: Run tests on Go 1.17+ Add in a ^1.17.0 go-version for the actions/setup-go@v2 action. This was set for our build step but not for the step that runs all of the unit tests. Signed-off-by: Daniel Canter --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e645b270..63a15efe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,6 +12,8 @@ jobs: steps: - uses: actions/checkout@v2 - uses: actions/setup-go@v2 + with: + go-version: '^1.17.0' - run: go test -gcflags=all=-d=checkptr -v ./... build: