1
0
mirror of https://github.com/juanfont/headscale.git synced 2026-02-07 20:04:00 +01:00
juanfont.headscale/cmd/hi
Kristoffer Dalby 164a7c9dbd all: fix golangci-lint issues (noctx, unused, unparam, goconst, prealloc, predeclared, gocritic)
This commit fixes multiple golangci-lint issues:

- noctx: Use context-aware functions (exec.CommandContext, db.ExecContext,
  db.PingContext, db.QueryRowContext, net.ListenConfig.Listen,
  http.NewRequestWithContext, net.Resolver.LookupIPAddr)
- unused: Remove unused mockState type and methods in mapper_test.go,
  unused createTestNodeSimple in maprequest_test.go, unused batchSize const
- unparam: Remove unused error returns (nodeRoutesToPtables,
  parseUpdateAndAnalyze, renderOIDCCallbackTemplate), remove unused parameters
  (drainChannelTimeout name, requireAllClientsOfflineStaged message/timeout,
  node hostinfo, Protocol.parseProtocol bool return)
- goconst: Extract repeated strings to constants (defaultTestNodePrefix,
  stateOnline, stateOffline, testUnknownNode)
- prealloc: Preallocate slices where beneficial (PolicyManagerFuncsForTest,
  routes slice, command slice, testCases)
- predeclared: Rename min/max variables to minVal/maxVal to avoid shadowing
  Go 1.21+ built-ins
- gocritic: Add nolint comment for exitAfterDefer in app.go initialization
- noinlineerr: Refactor inline error handling to use plain assignment
- nosprintfhostport: Use net.JoinHostPort for URL construction
- gosec G115: Add nolint comment for safe integer conversion

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 09:37:22 +00:00
..
cleanup.go all: apply golangci-lint fixes 2026-02-06 06:54:44 +00:00
docker.go all: fix golangci-lint issues (noctx, unused, unparam, goconst, prealloc, predeclared, gocritic) 2026-02-06 09:37:22 +00:00
doctor.go all: fix golangci-lint issues (noctx, unused, unparam, goconst, prealloc, predeclared, gocritic) 2026-02-06 09:37:22 +00:00
main.go all: apply golangci-lint fixes 2026-02-06 06:54:44 +00:00
README.md cmd/hi: improve test cleanup to reduce CI disk usage (#2881) 2025-11-28 16:59:54 +01:00
run.go all: apply golangci-lint fixes 2026-02-06 06:54:44 +00:00
stats.go all: fix golangci-lint issues (noctx, unused, unparam, goconst, prealloc, predeclared, gocritic) 2026-02-06 09:37:22 +00:00

hi

hi (headscale integration runner) is an entirely "vibe coded" wrapper around our integration test suite. It essentially runs the docker commands for you with some added benefits of extracting resources like logs and databases.