From 43e307b7c393560210c5127c9b4f233d324aca63 Mon Sep 17 00:00:00 2001 From: Mathias Fredriksson Date: Fri, 14 Mar 2025 15:02:38 +0000 Subject: [PATCH 1/3] build: update to Go 1.22 --- go.mod | 2 +- internal/examples/go.mod | 2 +- internal/thirdparty/go.mod | 2 +- internal/thirdparty/go.sum | 3 +++ 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 336411a5..e079bada 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ module github.com/coder/websocket -go 1.19 +go 1.22 diff --git a/internal/examples/go.mod b/internal/examples/go.mod index 2aa1ee02..934bfbe8 100644 --- a/internal/examples/go.mod +++ b/internal/examples/go.mod @@ -1,6 +1,6 @@ module github.com/coder/websocket/examples -go 1.19 +go 1.22 replace github.com/coder/websocket => ../.. diff --git a/internal/thirdparty/go.mod b/internal/thirdparty/go.mod index e060ce67..f92c4762 100644 --- a/internal/thirdparty/go.mod +++ b/internal/thirdparty/go.mod @@ -1,6 +1,6 @@ module github.com/coder/websocket/internal/thirdparty -go 1.19 +go 1.22 replace github.com/coder/websocket => ../.. diff --git a/internal/thirdparty/go.sum b/internal/thirdparty/go.sum index 2352ac75..a7be7082 100644 --- a/internal/thirdparty/go.sum +++ b/internal/thirdparty/go.sum @@ -16,6 +16,7 @@ github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm github.com/gin-gonic/gin v1.10.0 h1:nTuyha1TYqgedzytsKYqna+DfLos46nTv2ygFy86HFU= github.com/gin-gonic/gin v1.10.0/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y= github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= +github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= @@ -31,6 +32,7 @@ github.com/gobwas/ws v1.4.0/go.mod h1:G3gNqMNtPppf5XUz7O4shetPpcZ1VJ7zt18dlUeakr github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= @@ -96,6 +98,7 @@ golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= From fb3bc9ffc78eafe357595c1b64b2a8e293d71c80 Mon Sep 17 00:00:00 2001 From: Mathias Fredriksson Date: Fri, 14 Mar 2025 15:08:36 +0000 Subject: [PATCH 2/3] chore(ci): update tools --- ci/fmt.sh | 4 ++-- ci/lint.sh | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ci/fmt.sh b/ci/fmt.sh index e319a1e4..6ce3a20b 100755 --- a/ci/fmt.sh +++ b/ci/fmt.sh @@ -2,8 +2,8 @@ set -eu cd -- "$(dirname "$0")/.." -# Pin golang.org/x/tools, the go.mod of v0.25.0 is incompatible with Go 1.19. -X_TOOLS_VERSION=v0.24.0 +# Pin golang.org/x/tools, the go.mod of v0.31.0 is incompatible with Go 1.22. +X_TOOLS_VERSION=v0.30.0 go mod tidy (cd ./internal/thirdparty && go mod tidy) diff --git a/ci/lint.sh b/ci/lint.sh index cf9d1abd..20daff92 100755 --- a/ci/lint.sh +++ b/ci/lint.sh @@ -3,10 +3,13 @@ set -x set -eu cd -- "$(dirname "$0")/.." +STATICCHECK_VERSION=v0.6.1 +GOVULNCHECK_VERSION=v1.1.4 + go vet ./... GOOS=js GOARCH=wasm go vet ./... -go install honnef.co/go/tools/cmd/staticcheck@v0.4.7 +go install honnef.co/go/tools/cmd/staticcheck@${STATICCHECK_VERSION} staticcheck ./... GOOS=js GOARCH=wasm staticcheck ./... @@ -16,7 +19,7 @@ govulncheck() { cat "$tmpf" fi } -go install golang.org/x/vuln/cmd/govulncheck@v1.1.1 +go install golang.org/x/vuln/cmd/govulncheck@${GOVULNCHECK_VERSION} govulncheck ./... GOOS=js GOARCH=wasm govulncheck ./... From e4235bb89d097954fecb8839f80e7c56633f7e65 Mon Sep 17 00:00:00 2001 From: Mathias Fredriksson Date: Fri, 14 Mar 2025 15:31:57 +0000 Subject: [PATCH 3/3] s/1.22/1.23 --- ci/fmt.sh | 3 +-- go.mod | 2 +- internal/examples/go.mod | 2 +- internal/thirdparty/go.mod | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/ci/fmt.sh b/ci/fmt.sh index 6ce3a20b..588510ba 100755 --- a/ci/fmt.sh +++ b/ci/fmt.sh @@ -2,8 +2,7 @@ set -eu cd -- "$(dirname "$0")/.." -# Pin golang.org/x/tools, the go.mod of v0.31.0 is incompatible with Go 1.22. -X_TOOLS_VERSION=v0.30.0 +X_TOOLS_VERSION=v0.31.0 go mod tidy (cd ./internal/thirdparty && go mod tidy) diff --git a/go.mod b/go.mod index e079bada..d32fbd77 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ module github.com/coder/websocket -go 1.22 +go 1.23 diff --git a/internal/examples/go.mod b/internal/examples/go.mod index 934bfbe8..e368b76b 100644 --- a/internal/examples/go.mod +++ b/internal/examples/go.mod @@ -1,6 +1,6 @@ module github.com/coder/websocket/examples -go 1.22 +go 1.23 replace github.com/coder/websocket => ../.. diff --git a/internal/thirdparty/go.mod b/internal/thirdparty/go.mod index f92c4762..7a86aca9 100644 --- a/internal/thirdparty/go.mod +++ b/internal/thirdparty/go.mod @@ -1,6 +1,6 @@ module github.com/coder/websocket/internal/thirdparty -go 1.22 +go 1.23 replace github.com/coder/websocket => ../..