Rewriting of find(), which now checks for in-depth values,
and ignores shadowed ones.
* When looking for "foo.bar":
- before: if "foo" was defined in some map, "foo.*" was looked for
only in this map
- now: "foo.*" is looked for in all maps, the first one with a value is
used (even if "foo" was defined elsewhere, in a higher-priority map).
* Also, find() tests that the requested key is not shadowed somewhere
on its path.
e.g., {"foo.bar": 1} in the config map shadows "foo.bar.baz" in
the defaults map
* Lastly, if in the config map, config["foo"]["bar"] and config["foo.bar"]
coexist, the latter value is used.
(this should not be necessary for other maps, since by construction
their keys should not contain dots)
=> Get() and IsSet() corrected and simplified, since all the logic
about value retrieval has been put in find()
+ README.md modified accordingly:
In Section “Accessing nested keys”, to reflect the corrected behavior of find():
- paths searched for at all levels, not only the one of the first sub-key;
- paths may be shadowed by a shorter, higher priority, path.
+ tests modified accordingly
* 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