diff --git a/Justfile b/Justfile index 2438b2f..ec554b0 100644 --- a/Justfile +++ b/Justfile @@ -2,7 +2,7 @@ set shell := ["bash", "-u", "-c"] export scripts := ".github/workflows/scripts" export GOBIN := `echo $PWD/.bin` -export GOTOOLCHAIN := 'go1.25.6' +export GOTOOLCHAIN := 'go1.26.1' # show available commands [private] @@ -25,13 +25,6 @@ tests: test unit: go test -v -count=1 -race -run {{unit}} 2>/dev/null -# ensure copywrite headers present on source files -[group('lint')] -copywrite: - $GOBIN/copywrite \ - --config {{scripts}}/copywrite.hcl headers \ - --spdx "BSD-3-Clause" - # apply go vet command on source tree [group('lint')] vet: @@ -50,6 +43,4 @@ lint: vet # locally install build dependencies [group('build')] init: - go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.8.0 - go install github.com/hashicorp/copywrite@v0.24.0 - + go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.11.4 diff --git a/go.mod b/go.mod index fff92b1..df61b57 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module cattlecloud.net/go/webtools -go 1.25 +go 1.26 require ( cattlecloud.net/go/scope v1.2.1 diff --git a/useragent_test.go b/useragent_test.go index 8fdca73..398fd83 100644 --- a/useragent_test.go +++ b/useragent_test.go @@ -81,7 +81,7 @@ func TestOrigins(t *testing.T) { t.Parallel() agent := "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36" - r := httptest.NewRequest(http.MethodPost, "https://example.org/v1/data", nil) + r := httptest.NewRequestWithContext(t.Context(), http.MethodPost, "https://example.org/v1/data", nil) r.Header.Set("X-Forwarded-For", "10.1.1.1") r.Header.Set("Referer", "https://dashboard.example.org/home") r.Header.Set("User-Agent", agent)