Skip to content

Commit

Permalink
fix: check returned error
Browse files Browse the repository at this point in the history
  • Loading branch information
Zebradil committed Aug 23, 2023
1 parent 2af1886 commit 613a78f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,10 @@ If multiple IPv6 addresses are found on the interface, the one from the subnet w
rootCmd.Flags().String("log-level", "info", "Sets logging level: trace, debug, info, warning, error, fatal, panic.")
rootCmd.Flags().String("token", "", "Cloudflare API token with DNS edit access rights.")

viper.BindPFlags(rootCmd.Flags())
err := viper.BindPFlags(rootCmd.Flags())
if err != nil {
log.WithError(err).Fatal("Couldn't bind flags")
}
}

// initConfig reads in config file and ENV variables if set.
Expand Down

0 comments on commit 613a78f

Please sign in to comment.