From 8b744a9310de812fd324878121c8011b1aad0ea6 Mon Sep 17 00:00:00 2001 From: spf13 Date: Mon, 7 Apr 2014 23:35:40 -0400 Subject: [PATCH] Added "ConfigFileUsed" function --- README.md | 4 ++-- viper.go | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6d8f022..09a3d50 100644 --- a/README.md +++ b/README.md @@ -80,14 +80,14 @@ validate. Viper is designed to work with YAML, TOML or JSON files. If someone really wants to add this feature, I’d be happy to merge it. It’s 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? diff --git a/viper.go b/viper.go index 81bee79..ff5549a 100644 --- a/viper.go +++ b/viper.go @@ -46,6 +46,10 @@ func SetConfigFile(in string) { } } +func ConfigFileUsed() string { + return configFile +} + func AddConfigPath(in string) { if in != "" { absin := absPathify(in)