Replies: 1 comment 1 reply
-
Based on the code here it seems you are trying to get config out of Viper before it's initialized. Try to use Viper from inside our commands. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm a new spf13/viper, but occurs some problem.
First, I create a
cli-x.yml
in cli-x (the root folder) , and I set the viper config in cmd/root.go ,but when I want use thecli-x.yml
in connect/mongo.go , It can't be used.The folder structure is
cli-x (root folder)
the repo is https://github.com/Juminiy/cli-x
Beta Was this translation helpful? Give feedback.
All reactions