Note TOML support in README and CHANGELOG
This commit is contained in:
parent
a71fcd8f23
commit
b616f60886
@ -6,6 +6,7 @@
|
|||||||
### Added
|
### Added
|
||||||
- Flag type code generation via `go generate`
|
- Flag type code generation via `go generate`
|
||||||
- Write to stderr and exit 1 if action returns non-nil error
|
- Write to stderr and exit 1 if action returns non-nil error
|
||||||
|
- Added support for TOML to the `altsrc` loader
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- Raise minimum tested/supported Go version to 1.2+
|
- Raise minimum tested/supported Go version to 1.2+
|
||||||
|
16
README.md
16
README.md
@ -31,7 +31,7 @@ applications in an expressive way.
|
|||||||
+ [Placeholder Values](#placeholder-values)
|
+ [Placeholder Values](#placeholder-values)
|
||||||
+ [Alternate Names](#alternate-names)
|
+ [Alternate Names](#alternate-names)
|
||||||
+ [Values from the Environment](#values-from-the-environment)
|
+ [Values from the Environment](#values-from-the-environment)
|
||||||
+ [Values from alternate input sources (YAML and others)](#values-from-alternate-input-sources-yaml-and-others)
|
+ [Values from alternate input sources (YAML, TOML, and others)](#values-from-alternate-input-sources-yaml-toml-and-others)
|
||||||
* [Subcommands](#subcommands)
|
* [Subcommands](#subcommands)
|
||||||
* [Subcommands categories](#subcommands-categories)
|
* [Subcommands categories](#subcommands-categories)
|
||||||
* [Exit code](#exit-code)
|
* [Exit code](#exit-code)
|
||||||
@ -513,10 +513,14 @@ func main() {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Values from alternate input sources (YAML and others)
|
#### Values from alternate input sources (YAML, TOML, and others)
|
||||||
|
|
||||||
There is a separate package altsrc that adds support for getting flag values
|
There is a separate package altsrc that adds support for getting flag values
|
||||||
from other input sources like YAML.
|
from other file input sources.
|
||||||
|
|
||||||
|
Currently supported input source formats:
|
||||||
|
* YAML
|
||||||
|
* TOML
|
||||||
|
|
||||||
In order to get values for a flag from an alternate input source the following
|
In order to get values for a flag from an alternate input source the following
|
||||||
code would be added to wrap an existing cli.Flag like below:
|
code would be added to wrap an existing cli.Flag like below:
|
||||||
@ -538,9 +542,9 @@ the yaml input source for any flags that are defined on that command. As a note
|
|||||||
the "load" flag used would also have to be defined on the command flags in order
|
the "load" flag used would also have to be defined on the command flags in order
|
||||||
for this code snipped to work.
|
for this code snipped to work.
|
||||||
|
|
||||||
Currently only YAML files are supported but developers can add support for other
|
Currently only the aboved specified formats are supported but developers can
|
||||||
input sources by implementing the altsrc.InputSourceContext for their given
|
add support for other input sources by implementing the
|
||||||
sources.
|
altsrc.InputSourceContext for their given sources.
|
||||||
|
|
||||||
Here is a more complete sample of a command using YAML support:
|
Here is a more complete sample of a command using YAML support:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user