diff --git a/cmd/headscale/cli/utils.go b/cmd/headscale/cli/utils.go index 7dde4199..ccb4b97d 100644 --- a/cmd/headscale/cli/utils.go +++ b/cmd/headscale/cli/utils.go @@ -566,7 +566,7 @@ func GetFileMode(key string) fs.FileMode { return fs.FileMode(mode) } -func contains(ts []T, t T) bool { +func contains[T string](ts []T, t T) bool { for _, v := range ts { if reflect.DeepEqual(v, t) { return true diff --git a/poll.go b/poll.go index c273f795..3bad0b89 100644 --- a/poll.go +++ b/poll.go @@ -619,7 +619,7 @@ func (h *Headscale) scheduledPollWorker( } } -func closeChanWithLog(channel C, machine, name string) { +func closeChanWithLog[C chan []byte | chan struct{}](channel C, machine, name string) { log.Trace(). Str("handler", "PollNetMap"). Str("machine", machine).