Commit graph

174 commits

Author SHA1 Message Date
Daniel Eloff
e133904c4f Add GetSizeInBytes.
Useful to parse strings like 1GB or 12 mb into an unsigned integer number of bytes.
2015-03-12 22:19:13 -04:00
Chance Zibolski
03fb74b5d7 Support rewriting env keys 2015-03-06 11:21:17 -08:00
Ross Cooperman
90734830d1 Move viper.Reset() back to the public interface
It is helpful for applications that use viper to be able to
reset their configurations between test runs.
2015-02-24 11:54:15 -05:00
spf13
6c5a915341 adding more env tests 2015-02-16 23:32:10 -05:00
spf13
1022d75c73 Adding Support for Environment variable prefixes 2014-12-22 18:31:11 -05:00
spf13
91b076eec5 MarshallReader -> marshalReader 2014-12-06 09:48:28 +01:00
spf13
18a87c05c6 Adding documentation inline. Moving Reset() to viper_test.go 2014-12-05 17:04:40 +01:00
spf13
29f1858f87 Viper now supports multiple vipers. No API changes. 2014-12-05 03:55:51 +01:00
Brian Ketelsen
0562ef4c8b merge upstream/master 2014-10-28 22:09:30 -04:00
Brian Ketelsen
51da30f655 Added basic documentation, pointers to crypt repository, and tests for precedence 2014-10-27 15:32:46 -04:00
Brian Ketelsen
f8939d9229 existing tests pass 2014-10-26 09:48:21 -04:00
Chris Hamant
1b8adf4854 fixing problem with case sensitivity with keys in env and flags maps 2014-10-09 16:39:24 -04:00
Chris Hamant
01b1780288 adding simple test for BindPFlag 2014-10-09 15:52:49 -04:00
spf13
83fd92627c Adding automatic reading from ENV w/tests 2014-09-27 14:05:01 -07:00
spf13
aacc3049e2 Adding AllKeys and AllSettings functions and tests 2014-09-27 14:05:01 -07:00
spf13
181a3b5f3b Adding support for ENV variables 2014-09-27 14:04:50 -07:00
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
af373af72c Adding the ability to get into a struct 2014-06-26 17:58:55 -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
spf13
25817ada59 Added Reset Function 2014-04-07 23:35:53 -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