diff options
Diffstat (limited to '')
-rw-r--r-- | src/c_lhosts.go | 9 |
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] } |