From 8af60c7e4bc37ee65b15bf6c09e20d8b5244405b Mon Sep 17 00:00:00 2001 From: Tobias Gesellchen Date: Sun, 15 Feb 2026 20:18:42 +0100 Subject: [PATCH] fix linter issues --- pkg/service/setup/setup.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/service/setup/setup.go b/pkg/service/setup/setup.go index 8bd0c32..683f4f4 100644 --- a/pkg/service/setup/setup.go +++ b/pkg/service/setup/setup.go @@ -874,7 +874,9 @@ func (m *Manager) migrateViaHosts(deviceIP, targetURL string) (string, error) { } lines := strings.Split(hostsContent, "\n") + var newLines []string + domainFound := make(map[string]bool) for _, line := range lines { @@ -888,6 +890,7 @@ func (m *Manager) migrateViaHosts(deviceIP, targetURL string) (string, error) { if len(fields) >= 2 { domain := fields[1] isBoseDomain := false + for _, d := range domains { if d == domain { isBoseDomain = true @@ -899,9 +902,11 @@ func (m *Manager) migrateViaHosts(deviceIP, targetURL string) (string, error) { // Update existing entry with new IP newLines = append(newLines, fmt.Sprintf("%s\t%s", hostIP, domain)) domainFound[domain] = true + continue } } + newLines = append(newLines, line) }