From fd0ccc1f0bfb15ec22b84a2f3dbd83fc4aa52f24 Mon Sep 17 00:00:00 2001 From: "Mikhail f. Shiryaev" Date: Mon, 30 Dec 2019 13:55:36 +0100 Subject: [PATCH] Fix printing ipv6 with brackets --- server/server.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/server.go b/server/server.go index 6411e71..b32e769 100644 --- a/server/server.go +++ b/server/server.go @@ -127,10 +127,10 @@ func (server *Server) Run(ctx context.Context, options ...RunOption) error { scheme = "https" } host, port, _ := net.SplitHostPort(listener.Addr().String()) - log.Printf("HTTP server is listening at: %s", scheme+"://"+host+":"+port+path) + log.Printf("HTTP server is listening at: %s", scheme+"://"+net.JoinHostPort(host, port)+path) if server.options.Address == "0.0.0.0" { for _, address := range listAddresses() { - log.Printf("Alternative URL: %s", scheme+"://"+address+":"+port+path) + log.Printf("Alternative URL: %s", scheme+"://"+net.JoinHostPort(address, port)+path) } }