1
0
mirror of https://github.com/juanfont/headscale.git synced 2026-02-23 13:50:36 +01:00
juanfont.headscale/hscontrol/util
Kristoffer Dalby 0f6d312ada all: upgrade to Go 1.26rc2 and modernize codebase
This commit upgrades the codebase from Go 1.25.5 to Go 1.26rc2 and
adopts new language features.

Toolchain updates:
- go.mod: go 1.25.5 → go 1.26rc2
- flake.nix: buildGo125Module → buildGo126Module, go_1_25 → go_1_26
- flake.nix: build golangci-lint from source with Go 1.26
- Dockerfile.integration: golang:1.25-trixie → golang:1.26rc2-trixie
- Dockerfile.tailscale-HEAD: golang:1.25-alpine → golang:1.26rc2-alpine
- Dockerfile.derper: golang:alpine → golang:1.26rc2-alpine
- .goreleaser.yml: go mod tidy -compat=1.25 → -compat=1.26
- cmd/hi/run.go: fallback Go version 1.25 → 1.26rc2
- .pre-commit-config.yaml: simplify golangci-lint hook entry

Code modernization using Go 1.26 features:
- Replace tsaddr.SortPrefixes with slices.SortFunc + netip.Prefix.Compare
- Replace ptr.To(x) with new(x) syntax
- Replace errors.As with errors.AsType[T]

Lint rule updates:
- Add forbidigo rules to prevent regression to old patterns
2026-02-08 12:35:23 +01:00
..
zlog hscontrol/util/zlog/zf: add tag, authkey, and route constants 2026-02-06 07:40:29 +01:00
addr_test.go all: fix golangci-lint issues (#3064) 2026-02-06 21:45:32 +01:00
addr.go all: fix golangci-lint issues (#3064) 2026-02-06 21:45:32 +01:00
const.go Split code into modules 2023-05-26 12:24:50 +02:00
dns_test.go all: fix golangci-lint issues (#3064) 2026-02-06 21:45:32 +01:00
dns.go all: fix golangci-lint issues (#3064) 2026-02-06 21:45:32 +01:00
file.go all: fix golangci-lint issues (#3064) 2026-02-06 21:45:32 +01:00
key.go errors: rewrite errors to follow go best practices 2026-02-06 07:40:29 +01:00
log.go all: fix golangci-lint issues (#3064) 2026-02-06 21:45:32 +01:00
net.go integration: replace time.Sleep with assert.EventuallyWithT (#2680) 2025-07-10 23:38:55 +02:00
prompt_test.go all: fix golangci-lint issues (#3064) 2026-02-06 21:45:32 +01:00
prompt.go all: fix golangci-lint issues (#3064) 2026-02-06 21:45:32 +01:00
string_test.go allow users to be defined with @ in v1 (#2495) 2025-03-30 11:19:05 +00:00
string.go all: fix golangci-lint issues (#3064) 2026-02-06 21:45:32 +01:00
test.go all: upgrade to Go 1.26rc2 and modernize codebase 2026-02-08 12:35:23 +01:00
util_test.go all: fix golangci-lint issues (#3064) 2026-02-06 21:45:32 +01:00
util.go all: fix golangci-lint issues (#3064) 2026-02-06 21:45:32 +01:00