diff options
| author | Alex Flint <[email protected]> | 2022-10-29 15:13:57 -0400 |
|---|---|---|
| committer | Alex Flint <[email protected]> | 2022-10-29 15:13:57 -0400 |
| commit | d949871b676ed52669c17c2070dfb770b6ce28da (patch) | |
| tree | 9c4f96bf974094c8505c1bc19266a3f40639c439 | |
| parent | 9d5e97ac8ab96cab92076de4a1483d9018a3f9b4 (diff) | |
add further comment about backwards-compatible method for setting default values
| -rw-r--r-- | parse.go | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -210,6 +210,8 @@ func NewParser(config Config, dests ...interface{}) (*Parser, error) { } // for backwards compatibility, add nonzero field values as defaults + // this applies only to the top-level command, not to subcommands (this inconsistency + // is the reason that this method for setting default values was deprecated) for _, spec := range cmd.specs { // get the value v := p.val(spec.dest) |
