aboutsummaryrefslogtreecommitdiffstats
path: root/src/c_lhosts.go
diff options
context:
space:
mode:
authorJoe <rbo@gmx.us>2024-04-12 20:20:20 +0200
committerJoe <rbo@gmx.us>2024-04-12 20:20:20 +0200
commitbca4186e5550006f99ba38017840e660aa4016b1 (patch)
tree96c982168cabae474aef68e7b5d1aa62491abf7b /src/c_lhosts.go
parentcool (diff)
downloadhardflip-bca4186e5550006f99ba38017840e660aa4016b1.tar.gz
hardflip-bca4186e5550006f99ba38017840e660aa4016b1.tar.bz2
hardflip-bca4186e5550006f99ba38017840e660aa4016b1.tar.xz
hardflip-bca4186e5550006f99ba38017840e660aa4016b1.tar.zst
hardflip-bca4186e5550006f99ba38017840e660aa4016b1.zip
commit
Diffstat (limited to '')
-rw-r--r--src/c_lhosts.go9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/c_lhosts.go b/src/c_lhosts.go
index 6e69a79..877135c 100644
--- a/src/c_lhosts.go
+++ b/src/c_lhosts.go
@@ -160,11 +160,8 @@ func (lhost *HostList) count() int {
}
func (host *HostNode) protocol_str() string {
- switch host.Protocol {
- case PROTOCOL_SSH: return "SSH"
- case PROTOCOL_RDP: return "RDP"
- case PROTOCOL_CMD: return "Single command"
- case PROTOCOL_OS: return "OpenStack CLI"
- default: return ""
+ if host.Protocol > PROTOCOL_MAX {
+ return ""
}
+ return PROTOCOL_STR[host.Protocol]
}