mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-08-19 00:56:16 +00:00
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:
co-authored by
Claude Opus 4.7
parent
8cc8f28bdd
commit
33c1db5b97
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user