Skip to content

Commit

Permalink
set default host as '0.0.0.0'. show configor verbose output only on d…
Browse files Browse the repository at this point in the history
…ebug
  • Loading branch information
Junker committed Sep 2, 2021
1 parent e3b3ce5 commit 99848dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions h02own.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 99848dc

Please sign in to comment.