Commit Graph

83 Commits

Author SHA1 Message Date
Alex Flint fe4a138ac8 test coverage 100% !! 2021-04-19 21:03:43 -07:00
Alex Flint ccf882dca7 finish adding comments to spec 2021-04-19 13:25:11 -07:00
Alex Flint 9949860eb3 change "kind" to "cardinality", add support for maps to parser 2021-04-19 13:21:04 -07:00
Alex Flint 23b96d7aac refactor canParse into kindOf 2021-04-19 12:49:49 -07:00
Alex Flint 1dfefdc43e factor setSlice into its own file, add setMap, and add tests for both 2021-04-19 12:10:53 -07:00
Alex Flint 172800ff9a fix a comment 2021-04-16 20:44:18 -07:00
Alex Flint efe5cdf4da replace "name" and "typ" by storing the original StructField 2021-01-31 19:40:38 -08:00
Alex Flint 2a91531140 Merge remote-tracking branch 'origin/master' into optional-long 2021-01-31 19:20:28 -08:00
Alex Flint aa6cb95149 skip unexported fields 2021-01-31 18:29:22 -08:00
Andrew Morozko faebd3e0f2 Optional long arguments 2020-12-20 02:54:03 +03:00
Alex Flint 6be0398e80 move empty tag check inside the loop 2020-07-06 09:54:23 -07:00
Alex Flint 17bbf2e7ef add Config.IgnoreEnv to ignore environment variables 2020-03-01 16:32:59 -06:00
Alex Flint 2cc1f136b1 make sure to deep copy the field indices 2020-01-24 14:34:56 -08:00
Alex Flint 711618869d fix issue with duplicate fields in embedded structs 2020-01-24 14:30:29 -08:00
Marco Molteni 33db14a48b parse: fix typo in comment 2020-01-19 19:38:19 +01:00
Andrew Morozko c49d847704 Removed "dataname" tag 2019-11-30 00:32:28 +03:00
Andrew Morozko c3a019cdb8 Various changes 2019-11-30 00:22:21 +03:00
Andrew Morozko 904e039267 Added the "dataname" tag 2019-11-29 22:33:16 +03:00
Alex Flint 45d0915afc
Remove %w for compatibility with go<1.13 2019-10-21 11:42:03 -07:00
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 0c95297990 add support for default values in struct tags 2019-10-08 16:39:00 -07:00
Alex Flint 233d378a50 fix issue 89 (multiple args terminated by "--") 2019-10-04 13:18:17 -07:00
Alex Flint 9f37d5f600 fix typo 2019-08-06 16:38:11 -07:00
Alex Flint 990e87d80d no need to initialize nil structs during path traversal 2019-05-03 16:32:16 -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 3392c173d7 add expected output for usage example 2019-05-03 13:07:12 -07:00
Alex Flint e55b361498 fix error message 2019-05-02 09:50:44 -07:00
Alex Flint 87be2d9790 add unittests for canParse 2019-05-02 09:28:17 -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 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 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 b8678d4045 refactor validation 2019-04-14 18:00:40 -07:00
Alex Flint 7b1d9ef23f simplify processing of positionals a little 2019-04-14 17:30:53 -07:00
Illia Volochii 89714b6f48 Fix the problem with errors 2018-05-14 22:18:05 +03:00
Illia Volochii fa5fe315f8 Change format from JSON to CSV 2018-05-01 12:02:44 +03:00
Illia Volochii 75bf1a1525 Fix providing multiple values via environment variables 2018-04-26 21:10:44 +03:00
Alex Flint b9375a2e66 fix repeated text unmarshal bug 2018-04-18 21:51:16 -07:00
Alex Flint 74dd5a2c5a separate scalar.CanParse from isBoolean 2018-04-18 21:33:46 -07:00
Alex Flint 6f2f3b4bf6 drop setScalar 2018-04-18 21:23:08 -07:00
Alex Flint a0df5f3391 handle negative values 2018-01-13 14:20:00 -08:00
Rick d7961941f0 Altered help tag parsing to reduce the constraints on help text content; old behaviour is retained for backward compatibility 2017-10-02 14:18:41 +01:00
Rick fb97335a13 Allow spaces after each comma in tags 2017-09-16 12:05:53 +01:00
Mario Hros 58e62faa3d required positional args 2017-03-30 20:32:39 +02:00