From 8d27c23625db891780571b08a564373d1901f8f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Matczuk?= Date: Wed, 14 Aug 2024 12:47:32 +0200 Subject: [PATCH 1/2] chore: bump go version --- .version | 2 +- go.mod | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.version b/.version index 7c8f6a5c..e0d2c576 100644 --- a/.version +++ b/.version @@ -1,4 +1,4 @@ -GO_VERSION=1.22.5 +GO_VERSION=1.22.6 X_TOOLS_VERSION=v0.15.0 GOLANGCI_LINT_VERSION=v1.56.0 diff --git a/go.mod b/go.mod index d7a025ec..11e872e3 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/saucelabs/forwarder -go 1.21 +go 1.22.6 require ( github.com/dop251/goja v0.0.0-20231027120936-b396bb4c349d From 45ef3e0f9298c2527b22881fed8604f614a76642 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Matczuk?= Date: Wed, 14 Aug 2024 12:47:48 +0200 Subject: [PATCH 2/2] martian: fix linkname --- internal/martian/errors.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/internal/martian/errors.go b/internal/martian/errors.go index 57d38e74..cdcfc0cc 100644 --- a/internal/martian/errors.go +++ b/internal/martian/errors.go @@ -37,9 +37,15 @@ func errno(v error) uintptr { return 0 } -//go:linkname h2ErrClosedBody golang.org/x/net/http2.h2ErrClosedBody +//go:linkname h2ErrClosedBody golang.org/x/net/http2.errClosedBody var h2ErrClosedBody error //nolint:errname // this is an exported variable from golang.org/x/net/http2 +func init() { + if h2ErrClosedBody == nil { + panic("http2.errClosedBody not linked") + } +} + // isClosedConnError reports whether err is an error from use of a closed network connection. func isClosedConnError(err error) bool { if err == nil {