From ea626e5dd0463f8bce28d29a7107a89b13a77806 Mon Sep 17 00:00:00 2001 From: sbldevnet Date: Mon, 28 Sep 2026 13:07:21 +0200 Subject: [PATCH] build: lower the go.mod directive to the version the code actually requires The go directive was pinned to 1.27.1 (latest stable) with no code-level justification. Determined via go build -gcflags="-lang=go1.2X" ./... that the code's own syntax/stdlib usage (generics, atomic.Pointer[T], errors.Join, math/rand/v2, and the per-iteration for-range loop variable semantics relied on in proxy.serve's goroutine closure) only needs 1.22. The actual binding floor is higher: golang.org/x/sync v0.23.0 (already pinned, providing singleflight) declares go 1.26.0 in its own go.mod, and go mod tidy raises the directive accordingly. go 1.25.0 fails go build with "updates to go.mod needed"; go 1.26.0 builds, vets, and passes go test -race cleanly. --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index cb8e3ae..3a299c7 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/sbldevnet/cloudflared-proxy -go 1.27.1 +go 1.26.0 require ( github.com/spf13/cobra v1.10.2