diff --git a/.golangci.yaml b/.golangci.yaml index 0a1b9dc2..5ab873d4 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -31,16 +31,15 @@ linters: # We should strive to enable these: - wrapcheck - goerr113 - - forcetypeassert - dupl - makezero - - paralleltest # We might want to enable this, but it might be a lot of work - cyclop - nestif - wsl # might be incompatible with gofumpt - testpackage + - paralleltest linters-settings: varnamelen: diff --git a/machine.go b/machine.go index be6d4467..a728e28c 100644 --- a/machine.go +++ b/machine.go @@ -350,7 +350,9 @@ func (h *Headscale) isOutdated(machine *Machine) bool { namespaces := make([]string, namespaceSet.Size()) for index, namespace := range namespaceSet.List() { - namespaces[index] = namespace.(string) + if name, ok := namespace.(string); ok { + namespaces[index] = name + } } lastChange := h.getLastStateChange(namespaces...)