style(preflight): replace if-else chain with switch (gocritic)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Tobias Gesellchen
2026-05-15 11:03:12 +02:00
co-authored by Claude Opus 4.7
parent 8cc8f28bdd
commit 33c1db5b97
+4 -3
View File
@@ -147,11 +147,12 @@ func FormatPreflightGuidance(httpsListenerPort int, res Probe443Result) string {
lines = append(lines, " - localhost:443: "+res.Localhost.Error)
}
if res.LAN.Reachable {
switch {
case res.LAN.Reachable:
lines = append(lines, fmt.Sprintf(" - %s:443 (LAN): reachable ✓", res.LANHost))
} else if res.LANHost != "" {
case res.LANHost != "":
lines = append(lines, fmt.Sprintf(" - %s:443 (LAN): %s", res.LANHost, res.LAN.Error))
} else {
default:
lines = append(lines, " - LAN: "+res.LAN.Error)
}