feat: format server listen address as URL
Alan Pearce alan@alanpearce.eu
Thu, 09 May 2024 19:30:02 +0200
1 files changed, 3 insertions(+), 1 deletions(-)
jump to
M serve/main.go → serve/main.go
@@ -4,6 +4,7 @@ import ( "fmt" "log" "log/slog" + "net/url" "os" "os/signal" "sync" @@ -56,7 +57,8 @@ defer wg.Done() sErr <- sv.Start() }() if !runtimeConfig.InDevServer { - log.Printf("server listening on %s", sv.Addr) + url, _ := url.Parse("http://" + sv.Addr) + log.Printf("server listening on %s", url.String()) } err = <-sErr