Added "ConfigFileUsed" function

This commit is contained in:
spf13 2014-04-07 23:35:40 -04:00
parent a54c415b55
commit 8b744a9310
2 changed files with 6 additions and 2 deletions

View file

@ -80,14 +80,14 @@ validate. Viper is designed to work with YAML, TOML or JSON files. If someone
really wants to add this feature, Id be happy to merge it. Its easy to
specify which formats your application will permit.
Q: Why viper?
Q: Why is it called "viper"?
A: Viper is designed to be a companion to
[Cobra](http://github.com/spf13/cobra). While both can operate completely
independently, together they make a powerful pair to handle much of your
application foundation needs.
Q: Why Cobra?
Q: Why is it called "Cobra"?
A: Is there a better name for a commander?

View file

@ -46,6 +46,10 @@ func SetConfigFile(in string) {
}
}
func ConfigFileUsed() string {
return configFile
}
func AddConfigPath(in string) {
if in != "" {
absin := absPathify(in)