chore(deps): bump golang.org/x/net to v0.58.0 to fix build on Go 1.27+ (#1787)

Symptom: building gatus (v5.36.0 and master) with Go 1.27.0 fails on
every platform with:

  # google.golang.org/grpc/internal/transport
  google.golang.org/grpc@v1.81.1/internal/transport/handler_server.go:271:18:
      undefined: http2.TrailerPrefix

Root cause: golang.org/x/net v0.54.0 (indirect dependency, pulled in via
grpc) started switching its http2 package to a shim that delegates to
the standard library's HTTP/2 server when built with Go >= 1.27. The
legacy implementation in http2/server.go, which declares the exported
const TrailerPrefix, is guarded by the build constraint
"!(go1.27 && !http2legacy)", so under Go 1.27+ it is excluded and
replaced by http2/server_wrap.go ("go1.27 && !http2legacy"). The
wrap-mode file set in v0.54.0 forgot to declare TrailerPrefix, so any
importer referencing http2.TrailerPrefix no longer compiles; grpc
v1.81.1 references it in internal/transport/handler_server.go:271.

The failure is Go-version-specific, not architecture-specific: it
reproduces identically on a linux/amd64 host build and on
GOOS=linux GOARCH=arm GOARM=7 and GOARCH=arm64 cross builds (it was
originally reported from a linux/arm SBC, which is incidental). Go 1.26
and older are unaffected because the go1.27 build tag is not set there
and the legacy implementation still compiles.

Fix: x/net v0.55.0 moved TrailerPrefix to http2/server_common.go, which
builds in both legacy and wrap mode, restoring the exported API. This
commit bumps golang.org/x/net to the current latest, v0.58.0, via
"go get golang.org/x/net@latest && go mod tidy", which also lifts the
sibling golang.org/x/* modules (crypto, mod, sync, sys, text, tools) to
their matching release tags. No grpc bump is required: v1.81.1 compiles
fine once the symbol exists again. go.mod/go.sum only, no code changes.

Verification:
- Go 1.27.0 (GOTOOLCHAIN=local): go build ./..., go vet ./... and
  go test ./... pass on linux/amd64; CGO_ENABLED=0 cross builds for
  GOOS=linux GOARCH=arm GOARM=7 and GOOS=linux GOARCH=arm64 succeed.
  Before this change, all of the above failed with the error quoted at
  the top.
- Go 1.26.3: go build ./... and go test ./... still pass, so older
  toolchains keep working.

This commit was prepared by an AI agent (Claude Fable 5, model id
claude-fable-5).

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Pavel GriaznovandClaude Fable 5 authored and GitHub committed 2026-08-27 17:05:18 -04:00
1 parent 08c463542f
commit 4d15cb7eed
2 files changed
+23 -23

No files matched your search

+7 -7
View File
@@ -27,9 +27,9 @@ require (
github.com/registrobr/rdap v1.1.8
github.com/valyala/fasthttp v1.71.0
github.com/wcharczuk/go-chart/v2 v2.1.2
golang.org/x/crypto v0.52.0
golang.org/x/crypto v0.55.0
golang.org/x/oauth2 v0.36.0
golang.org/x/sync v0.20.0
golang.org/x/sync v0.22.0
google.golang.org/api v0.280.0
google.golang.org/grpc v1.81.1
gopkg.in/mail.v2 v2.3.1
@@ -89,11 +89,11 @@ require (
go.opentelemetry.io/otel/trace v1.43.0 // indirect
go.yaml.in/yaml/v2 v2.4.4 // indirect
golang.org/x/image v0.40.0 // indirect
golang.org/x/mod v0.36.0 // indirect
golang.org/x/net v0.54.0 // indirect
golang.org/x/sys v0.45.0 // indirect
golang.org/x/text v0.37.0 // indirect
golang.org/x/tools v0.45.0 // indirect
golang.org/x/mod v0.38.0 // indirect
golang.org/x/net v0.58.0 // indirect
golang.org/x/sys v0.47.0 // indirect
golang.org/x/text v0.41.0 // indirect
golang.org/x/tools v0.48.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260519071638-aa98bba5eb94 // indirect
google.golang.org/protobuf v1.36.11 // indirect
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect