mirror of
https://github.com/juanfont/headscale.git
synced 2026-04-19 23:31:31 +02:00
all: apply golangci-lint 2.9.0 fixes
Fix issues found by the upgraded golangci-lint: - wsl_v5: add required whitespace in CLI files - staticcheck SA4006: replace new(var.Field) with &localVar pattern since staticcheck does not recognize Go 1.26 new(value) as a use of the variable - staticcheck SA5011: use t.Fatal instead of t.Error for nil guard checks so execution stops - unused: remove dead ptrTo helper function
This commit is contained in:
@@ -365,11 +365,6 @@ func KeyExpiry(nodeID types.NodeID, expiry *time.Time) Change {
|
||||
}
|
||||
}
|
||||
|
||||
// ptrTo returns a pointer to the given value.
|
||||
func ptrTo[T any](v T) *T {
|
||||
return new(v)
|
||||
}
|
||||
|
||||
// High-level change constructors
|
||||
|
||||
// NodeAdded returns a Change for when a node is added or updated.
|
||||
|
||||
Reference in New Issue
Block a user