From fec8cda16af8200ab4061dc5d0fcd5db3ff158fa Mon Sep 17 00:00:00 2001 From: Adrien Raffin-Caboisse Date: Mon, 25 Apr 2022 22:33:53 +0200 Subject: [PATCH] fix: fix linting issue on my computer --- cmd/headscale/cli/utils.go | 2 +- poll.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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).