Skip to content

Commit

Permalink
fix listen validation
Browse files Browse the repository at this point in the history
  • Loading branch information
cryi committed Feb 12, 2024
1 parent e10d204 commit 4f4e675
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 2 additions & 1 deletion configuration/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package configuration
import (
"errors"
"log/slog"
"net"
"net/url"
"os"
"path/filepath"
Expand Down Expand Up @@ -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
}
Expand Down
1 change: 0 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 4f4e675

Please sign in to comment.