From f42dfe7b5fd3d60c9558eb520d33c7c8fd1ba201 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Thu, 9 May 2024 19:30:02 +0200 Subject: feat: format server listen address as URL --- serve/main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'serve/main.go') diff --git a/serve/main.go b/serve/main.go index 9378de1..5c68cc5 100644 --- a/serve/main.go +++ b/serve/main.go @@ -4,6 +4,7 @@ import ( "fmt" "log" "log/slog" + "net/url" "os" "os/signal" "sync" @@ -56,7 +57,8 @@ func main() { 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 -- cgit 1.4.1