diff --git a/configuration/runtime.go b/configuration/runtime.go index 57a9879..5a300f6 100644 --- a/configuration/runtime.go +++ b/configuration/runtime.go @@ -3,6 +3,7 @@ package configuration import ( "errors" "log/slog" + "net" "net/url" "os" "path/filepath" @@ -183,7 +184,7 @@ func (r *Runtime) Hydrate() *Runtime { func (r *Runtime) Validate() (*Runtime, error) { if r.Listen != "" { - _, err := url.Parse(r.Listen) + _, _, err := net.SplitHostPort(r.Listen) if err != nil { return nil, constants.ErrInvalidListenAddress } diff --git a/main.go b/main.go index 730aeb3..64c21df 100644 --- a/main.go +++ b/main.go @@ -30,7 +30,6 @@ type Message struct { var staticFiles embed.FS func main() { - logLevelFlag := flag.String("log-level", "info", "Log level") versionFlag := flag.Bool("version", false, "Print version and exit") flag.Parse()