mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-11 21:27:31 +00:00
various: add golangci-lint, fix issues (#7905)
This adds an initial and intentionally minimal configuration for golang-ci, fixes the issues reported, and adds a GitHub Action to check new pull requests against this linter configuration. Signed-off-by: Andrew Dunham <andrew@du.nham.ca> Change-Id: I8f38fbc315836a19a094d0d3e986758b9313f163
This commit is contained in:
@@ -26,7 +26,7 @@ func Set[K comparable, V any, T ~map[K]V](m *T, k K, v V) {
|
||||
// the field to be defined after they decode the JSON.)
|
||||
//
|
||||
// Deprecated: use NonNilSliceForJSON or NonNilMapForJSON instead.
|
||||
func NonNil(ptr interface{}) {
|
||||
func NonNil(ptr any) {
|
||||
if ptr == nil {
|
||||
panic("nil interface")
|
||||
}
|
||||
|
@@ -147,4 +147,3 @@ func SelectControlURL(reg, disk string) string {
|
||||
}
|
||||
return def
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user