diff options
author | Alan Pearce | 2024-05-09 19:30:02 +0200 |
---|---|---|
committer | Alan Pearce | 2024-05-09 19:31:36 +0200 |
commit | f42dfe7b5fd3d60c9558eb520d33c7c8fd1ba201 (patch) | |
tree | 58abf30e34b78fc66ac74cb768c770c3d251bb46 /serve | |
parent | 830e14f372fcff094448ac8528386ab381f6f35c (diff) | |
download | searchix-f42dfe7b5fd3d60c9558eb520d33c7c8fd1ba201.tar.lz searchix-f42dfe7b5fd3d60c9558eb520d33c7c8fd1ba201.tar.zst searchix-f42dfe7b5fd3d60c9558eb520d33c7c8fd1ba201.zip |
feat: format server listen address as URL
Diffstat (limited to 'serve')
-rw-r--r-- | serve/main.go | 4 |
1 files changed, 3 insertions, 1 deletions
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 |