From 99848dc0c201a38006e5d5cf62261711cd1dd662 Mon Sep 17 00:00:00 2001 From: Junker <1144095+Junker@users.noreply.github.com> Date: Fri, 3 Sep 2021 01:57:41 +0700 Subject: [PATCH] set default host as '0.0.0.0'. show configor verbose output only on debug --- h02own.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/h02own.go b/h02own.go index df8b672..bdca94b 100644 --- a/h02own.go +++ b/h02own.go @@ -23,7 +23,7 @@ var args struct { var config struct { Port uint `required:"true"` - Host string `required:"true" default:"localhost"` + Host string `required:"true" default:"0.0.0.0"` MQTT struct { Host string `default:"localhost"` @@ -228,7 +228,7 @@ func main() { arg.MustParse(&args) - err := configor.New(&configor.Config{ErrorOnUnmatchedKeys: true, Verbose: args.Verbose, Debug: args.Debug}).Load(&config, args.ConfigPath) + err := configor.New(&configor.Config{ErrorOnUnmatchedKeys: true, Verbose: args.Debug, Debug: args.Debug}).Load(&config, args.ConfigPath) if err != nil { log.Fatalf("Error loading config from: %s, error: %s", args.ConfigPath, err)