mirror of
https://github.com/juanfont/headscale.git
synced 2026-02-07 20:04:00 +01:00
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> |
||
|---|---|---|
| .. | ||
| api_key.go | ||
| configtest.go | ||
| debug.go | ||
| dump_config.go | ||
| generate.go | ||
| health.go | ||
| mockoidc.go | ||
| nodes.go | ||
| policy.go | ||
| preauthkeys.go | ||
| pterm_style.go | ||
| root_test.go | ||
| root.go | ||
| serve.go | ||
| users.go | ||
| utils.go | ||
| version.go | ||