From d04d8362945d39add4515db0fab22699f207af54 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sun, 29 Dec 2024 08:50:47 +0800 Subject: Use single config value for listen addr --- main.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'main.go') diff --git a/main.go b/main.go index f02a8a8..b4f0785 100644 --- a/main.go +++ b/main.go @@ -2,7 +2,6 @@ package main import ( "flag" - "fmt" "log" "net/http" @@ -30,7 +29,5 @@ func main() { } mux := routes.Handlers(c) - addr := fmt.Sprintf("%s:%d", c.Server.Host, c.Server.Port) - log.Println("starting server on", addr) - log.Fatal(http.ListenAndServe(addr, mux)) + log.Fatal(http.ListenAndServe(c.Server.Addr, mux)) } -- cgit v1.2.3