From bca4186e5550006f99ba38017840e660aa4016b1 Mon Sep 17 00:00:00 2001 From: Joe Date: Fri, 12 Apr 2024 20:20:20 +0200 Subject: commit --- src/c_lhosts.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/c_lhosts.go') 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] } -- cgit v1.2.3