From 2e26098614f03a58beb4e65f5a8cb520dd07e9b9 Mon Sep 17 00:00:00 2001 From: Seth Hoenig Date: Fri, 22 Apr 2022 08:14:51 -0500 Subject: [PATCH] services: format ipv6 in nomad service info output Co-authored-by: Michael Schurter --- command/service_info.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/service_info.go b/command/service_info.go index 91e47fd02..2275ba176 100644 --- a/command/service_info.go +++ b/command/service_info.go @@ -197,7 +197,7 @@ func formatAddress(address string, port int) string { if port == 0 { return address } - return fmt.Sprintf("%s:%d", address, port) + return net.JoinHostPort(address, strconv.Itoa(port)) } // formatOutput produces the verbose output of service registration info for a