Commit graph

117 commits

Author SHA1 Message Date
Nate Finch
2b24bea958 fix issue #8
This fixes the aliases in config files bug.  Whenever we register an alias, if there is a value in
the config (or defaults or override) for the alias, we move that value to the new "real key".

Added a test for the bug, which fails without the changes and passes with the changes.

This also fixes a bug in Hugo, where specifying "Taxonomies" in your config file doesn't get recognized,
because Hugo aliases "Taxonomies" to "Indexes" which means that when the code does a Get("Taxnomies") it
got translated to Get("Indexes"), which didn't exist in the original config map.
2014-08-06 00:27:39 -04:00
Nate Finch
3cf05f93ef fix test after function rename 2014-08-06 00:24:36 -04:00
spf13
38c6d9eca3 Better comments for go doc 2014-07-11 10:42:07 -04:00
spf13
c5a9056e3b Better naming of the Marshal functionality. 2014-07-11 10:41:45 -04:00
spf13
1cebee8d97 Better binding to Pflag 2014-07-11 10:28:03 -04:00
spf13
7c42740ea6 Adding the ability to bind a flag to a key. Will set the default & override automatically.
Use like:
	fetchCmd.Flags().Int("rsstimeout", 5, "Timeout (in min) for RSS retrival")
	viper.BindPFlag("rsstimeout", fetchCmd.Flags().Lookup("rsstimeout"))
2014-06-27 12:29:37 -04:00
spf13
af373af72c Adding the ability to get into a struct 2014-06-26 17:58:55 -04:00
spf13
7f5b583ff1 Handle $HOME and other environment variables in paths 2014-06-25 17:23:00 -04:00
spf13
541c1f8c59 Fixing case sensitivity bug with override values 2014-05-29 16:48:24 -04:00
Victor Castell
16d5c7c27d Add support for yml extension 2014-05-09 23:28:57 -04:00
Joshua Rubin
1a2e68e1bc return more useful error if config file is missing
Signed-off-by: Joshua Rubin <jrubin@zvelo.com>
2014-04-10 14:15:39 -04:00
spf13
25817ada59 Added Reset Function 2014-04-07 23:35:53 -04:00
spf13
8b744a9310 Added "ConfigFileUsed" function 2014-04-07 23:35:40 -04:00
spf13
a54c415b55 Adding first draft of README. 2014-04-05 15:44:26 -04:00
spf13
bcb02e2472 Viper is now case insensitive 2014-04-05 01:19:39 -04:00
spf13
98be0718d2 Initial Version 2014-04-04 17:21:59 -04:00
Steve Francia
f98d9bf08b Initial commit 2014-04-02 07:33:33 -07:00