From f7d3d9bfb5eda57b2f527b637e936ee10d386797 Mon Sep 17 00:00:00 2001 From: gak Date: Sun, 21 Jul 2019 11:51:30 +1000 Subject: [PATCH] A note in the README linking to a JSON example. --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 356044b..ccbbf7d 100644 --- a/README.md +++ b/README.md @@ -469,6 +469,8 @@ eg. kong.Parse(&cli, kong.Configuration(kong.JSON, "/etc/myapp.json", "~/.myapp.json")) ``` +[See the tests](https://github.com/alecthomas/kong/blob/master/resolver_test.go#L103) for an example of how the JSON file is structured. + ### `Resolver(...)` - support for default values from external sources Resolvers are Kong's extension point for providing default values from external sources. As an example, support for environment variables via the `env` tag is provided by a resolver. There's also a builtin resolver for JSON configuration files.