Commit Graph

303 Commits

Author SHA1 Message Date
Alex Flint 84e7a764db minor cleanups 2019-10-19 23:30:33 -07:00
Alex Flint cc768447a7 store default values during NewParser 2019-10-19 23:23:32 -07:00
Alex Flint 5d3ebcceee undo changes to go.mod 2019-10-08 16:47:31 -07:00
Alex Flint 0c95297990 add support for default values in struct tags 2019-10-08 16:39:00 -07:00
Alex Flint 873f3c2cf4
Merge pull request #90 from alexflint/fix-89
Multiple args are terminated by "--"
2019-10-05 09:26:10 -07:00
Alex Flint 233d378a50 fix issue 89 (multiple args terminated by "--") 2019-10-04 13:18:17 -07:00
Alex Flint 8baf7040d7
Merge pull request #82 from alexflint/subcommand-impl
Add support for subcommands
2019-08-06 16:58:46 -07:00
Alex Flint 11a27074fc test with go 1.12 2019-08-06 16:49:02 -07:00
Alex Flint e6003d3b6a add subcommands to readme 2019-08-06 16:41:50 -07:00
Alex Flint 9f37d5f600 fix typo 2019-08-06 16:38:11 -07:00
Alex Flint fcdfbc090b fix comment 2019-08-06 16:00:13 -07:00
Alex Flint 990e87d80d no need to initialize nil structs during path traversal 2019-05-03 16:32:16 -07:00
Alex Flint bd97edec87 add Parser.Subcommand and Parser.SubcommandNames 2019-05-03 16:08:29 -07:00
Alex Flint 3c5e61a292 simplify Fprint call 2019-05-03 15:50:41 -07:00
Alex Flint b83047068d print help and usage at subcommand level if necessary 2019-05-03 15:49:44 -07:00
Alex Flint 15bf383f1d add subcommands to usage string 2019-05-03 15:02:10 -07:00
Alex Flint edd1af4667 Merge remote-tracking branch 'origin/master' into subcommand-impl
# Conflicts:
#	parse.go
2019-05-03 13:16:52 -07:00
Alex Flint 6de9e789a9
Merge pull request #83 from alexflint/tweak-examples
Add expected outputs to all runnable examples
2019-05-03 13:14:44 -07:00
Alex Flint 3392c173d7 add expected output for usage example 2019-05-03 13:07:12 -07:00
Alex Flint e2ce620ee4 add expected outputs to all examples 2019-05-03 12:56:41 -07:00
Alex Flint c6473c4586 add tests for nested subcommands and subcommands with positionals 2019-05-03 11:21:34 -07:00
Alex Flint e55b361498 fix error message 2019-05-02 09:50:44 -07:00
Alex Flint a68d6000b6 test use of --version 2019-05-02 09:47:39 -07:00
Alex Flint 93fcb0e87d use backticks rather than backslashes in string literal 2019-05-02 09:46:11 -07:00
Alex Flint c8c61cf8bb add test for case where environment var is not present 2019-05-02 09:44:48 -07:00
Alex Flint f2f7bdbbd7 add test case for missing value in middle of argument string 2019-05-02 09:39:12 -07:00
Alex Flint a15b6ad670 add test for canParse with TextUnmarshaler 2019-05-02 09:32:23 -07:00
Alex Flint 87be2d9790 add unittests for canParse 2019-05-02 09:28:17 -07:00
Alex Flint 5b649de043 test no such subcommand 2019-05-02 09:16:33 -07:00
Alex Flint 237c5e2b23 Merge remote-tracking branch 'origin/master' into subcommand-impl 2019-04-30 13:54:49 -07:00
Alex Flint fb1ae1c3e0
Merge pull request #81 from alexflint/subcommands
small refactor to validation
2019-04-30 13:54:40 -07:00
Alex Flint 15b9bcfbb4 add several subcommand unittests 2019-04-30 13:53:14 -07:00
Alex Flint 39decf197f add several subcommand unittests 2019-04-30 13:49:55 -07:00
Alex Flint a78c6ded26 set subcommand structs to be struct pointers 2019-04-30 13:40:45 -07:00
Alex Flint af12b7cfc2 introduced path struct 2019-04-30 13:30:23 -07:00
Alex Flint 6a796e2c41 add first two subcommand tests 2019-04-30 12:54:39 -07:00
Alex Flint 4e977796af add recursive expansion of subcommands 2019-04-30 12:54:28 -07:00
Alex Flint ddec9e9e4f rename get/settable to readable/writable 2019-04-30 11:40:11 -07:00
Alex Flint 2267a58718 check error in test 2019-04-30 11:17:03 -07:00
Alex Flint 7df132abe8 check error in test 2019-04-30 11:16:10 -07:00
Alex Flint f282f71f26 minor reformat 2019-04-30 11:16:01 -07:00
Alex Flint e2dda40825 all tests passing again 2019-04-14 19:50:17 -07:00
Alex Flint e86673b20a restore process as a free func 2019-04-14 18:24:59 -07:00
Alex Flint 9edf2ebc95 Merge remote-tracking branch 'origin/master' into subcommands 2019-04-14 18:00:46 -07:00
Alex Flint b8678d4045 refactor validation 2019-04-14 18:00:40 -07:00
Alex Flint 78d30a555c
Merge pull request #80 from alexflint/simplify-positionals
Simplify handling of positionals a little
2019-04-14 18:00:17 -07:00
Alex Flint 7b1d9ef23f simplify processing of positionals a little 2019-04-14 17:30:53 -07:00
Alex Flint 42c2ab5ac6
Merge pull request #78 from alexflint/readme-spelling
minor fixes to readme
2019-04-14 17:18:01 -07:00
Alex Flint f519755eae
Merge pull request #79 from alexflint/update-deps
update deps with go mod tidy
2019-04-14 17:17:48 -07:00
Alex Flint 2952bf0265 update deps with go mod tidy; go vendor 2019-04-14 16:11:46 -07:00