Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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:
Expand All @@ -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
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module cattlecloud.net/go/webtools

go 1.25
go 1.26

require (
cattlecloud.net/go/scope v1.2.1
Expand Down
2 changes: 1 addition & 1 deletion useragent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading