diff options
author | Ben Morrison <ben@gbmor.dev> | 2019-05-13 02:52:32 -0400 |
---|---|---|
committer | Ben Morrison <ben@gbmor.dev> | 2019-05-13 02:52:32 -0400 |
commit | 67864b2568b0d51f3970470f3292c7bdfaf31bee (patch) | |
tree | d8f58c2cdfe4677e440099ed90a0e057ba0d9ec4 | |
parent | d57295e38b8afd16982f3f6083122ab73f62ddf7 (diff) | |
download | getwtxt-67864b2568b0d51f3970470f3292c7bdfaf31bee.tar.gz |
handling viper error when binding to pflags
-rw-r--r-- | init.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/init.go b/init.go index bef94af..a4790d5 100644 --- a/init.go +++ b/init.go @@ -36,7 +36,9 @@ func init() { func initConfig() { pflag.Parse() - viper.BindPFlags(pflag.CommandLine) + if err := viper.BindPFlags(pflag.CommandLine); err != nil { + log.Printf("%v\n", err) + } viper.SetConfigName("getwtxt") viper.AddConfigPath(".") |