Commit Graph

132 Commits

Author SHA1 Message Date
oliveagle 3492885e84 ReadBufConfig 2015-05-19 10:07:21 -04:00
bep be782f3fee Revert "Recursively insensitivize the configuration structures"
This reverts commit 8d9577a72e.

The commit is reasonable enough, but this is a major breaking change for Hugo.

We have to figure out how to handle this before we introduce this one.

See https://github.com/spf13/hugo/issues/1129
2015-05-11 23:36:48 +02:00
Kiril Zvezdarov 2e47d9ed4a Added doc entry on nested key access 2015-05-02 14:20:33 -04:00
Kiril Zvezdarov 8d9577a72e Recursively insensitivize the configuration structures 2015-05-01 22:52:16 -04:00
Kiril Zvezdarov 47b5435941 Added test coverage for searching for deeply nested values 2015-05-01 22:52:16 -04:00
Kiril Zvezdarov b22fa2b439 Reordered the debug dump of configs to print them in order of precedence 2015-05-01 22:52:16 -04:00
Kiril Zvezdarov c174e2427c Added accessing deep keys by recursive hierarchical search 2015-05-01 22:52:16 -04:00
Steve Francia 2578450e4a Merge pull request #64 from gitter-badger/gitter-badge
Add a Gitter chat badge to README.md
2015-05-01 16:03:55 -04:00
The Gitter Badger 2763b90eff Added Gitter badge 2015-05-01 20:02:50 +00:00
Kiril Zvezdarov 54e585af54 Clean config register before reading in from file in order to avoid stale values 2015-04-26 15:08:10 -04:00
Wayne Walker ba3382dd23 59 - add properties file support to viper 2015-04-14 13:15:02 -05:00
Kiril Zvezdarov 39ab3ca72e Noted that ReadInConfig returns errors that can be handled 2015-04-02 17:07:32 -04:00
Kiril Zvezdarov 40762f7541 Current working directory is added to the config search paths by default 2015-04-02 17:07:32 -04:00
Kiril Zvezdarov c861bdefb7 Set default values when binding the whole flagset 2015-04-02 17:04:19 -04:00
Kiril Zvezdarov 19ed496472 Added the pflags register to the debug output 2015-04-02 17:04:19 -04:00
Kiril Zvezdarov 24dd877ad7 Added BindPFlags function which binds all flags in a given flag set to the pflags register 2015-04-02 17:04:19 -04:00
Kiril Zvezdarov 9a0a6692b7 Added docstrings to all exported functions 2015-04-01 21:00:19 -04:00
Eran Chetz ac722f39d3 Change small syntax error in Env Example 2015-03-26 15:24:28 +02:00
Kiril Zvezdarov 2e2f3b2643 Marshal now gets the map via the AllSettings method
Conflicts:
	viper.go
2015-03-12 22:33:19 -04:00
Kiril Zvezdarov 700eefa74b Exported the Viper type in order to better support multiple Vipers
Conflicts:
	viper.go
2015-03-12 22:27:14 -04:00
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
Anthony Fok 5b0b926e3d :%s/insensativiseMap/insensitiviseMap/g 2015-03-07 04:04:19 -07:00
Anthony Fok 8b99f53550 Avoid searching for config file in executable's path
Viper should not be searching for config.{json,toml,yaml,yml}
in the directory where the `hugo` executable binary is located,
i.e. do not try to look for e.g. $GOPATH/bin/config.toml or
/usr/local/bin/config.toml
2015-03-07 04:01:22 -07:00
Anthony Fok 0c5f3e2462 Minor revisions to README.md
* Change the order to "JSON, TOML and YAML" because that is
   the order that Viper attempts to find the config file,
   as listed in SupportedExts string array

 * Rename "Indexes" to "Taxonomies" (re: Hugo)

 * GitHub now forces https, so update GitHub URLs accordingly

 * Add links to Wikipedia pages about Viper and Cobra Commander
   in case the users do not know the G.I. Joe reference

 * Other minor copyediting
2015-03-07 03:52:13 -07:00
Chance Zibolski 1258332127 Fix whitespace 2015-03-06 11:21:50 -08:00
Chance Zibolski 03fb74b5d7 Support rewriting env keys 2015-03-06 11:21:17 -08:00
Chance Zibolski ededa04e0b Add viper.GetDuration 2015-03-06 10:11:47 -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
Anthony Fok 82cbb7dec7 Upgrade from gopkg.in/yaml.v1 to gopkg.in/yaml.v2 2015-02-16 19:32:47 -05:00
spf13 d8f2aa78d4 More intelligent AutomaticEnv behavior and updated documentation. 2014-12-22 22:55:07 -05:00
spf13 54fed16054 Adding docs for SetEnvPrefix and cleaning up docs. 2014-12-22 21:45:56 -05:00
spf13 1022d75c73 Adding Support for Environment variable prefixes 2014-12-22 18:31:11 -05:00
kgv 2909239689 Change from Get(key) to v.Get(key) in GetXXX(key string) and MarshalKey(key string, rawVal interface{}) functions. 2014-12-09 08:29:33 -05:00
spf13 cacbc4c733 Rewriting the documentation 2014-12-07 02:03:49 +01: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
Andrew Cohen 90193e564a Add travis ci support 2014-11-13 16:36:34 -05:00
Andrew Cohen 5aa1437cf3 Fix missed path->filepath renaming
This fixes https://github.com/spf13/viper/issues/24

Caused by https://github.com/spf13/viper/pull/20
2014-11-13 16:23:17 -05:00
Steve Francia 64816e4860 Merge pull request #21 from cudevmaxwell/typo
Fixed typo
2014-11-12 16:54:00 -05:00
Steve Francia 4dcc7d4916 Merge pull request #20 from mohae/fix-windows-path
update to consistently use filepath instead of path and add looking in o...
2014-11-12 16:53:34 -05:00
Kevin Bowrin 6c340f2886 Fixed typo 2014-11-07 18:14:27 +00:00
Joel Scoble 22f85e27c4 update to consistently use filepath instead of path and add looking in os.Getwd() for the config file to fix finding the config file in Windows issue 2014-11-05 18:23:02 -06:00
Steve Francia 77144270da Merge pull request #18 from stp-ip/patch-1
Fix typo
2014-10-29 07:51:07 -04:00
Michael Grosser bddcf7e104 Fix typo 2014-10-29 07:43:14 +01:00
Steve Francia 22d0391e9b Merge pull request #17 from bketelsen/etcd-consul-crypt
Etcd consul crypt
2014-10-28 22:22:49 -04:00
Brian Ketelsen 0562ef4c8b merge upstream/master 2014-10-28 22:09:30 -04:00
Brian Ketelsen e55c96ecc9 document consul support, not requirement to set config type for remote KV stores 2014-10-27 21:53:22 -04:00
Brian Ketelsen 563f4d44c4 add support for consul 2014-10-27 21:14:46 -04:00