Commit Graph

323 Commits

Author SHA1 Message Date
Alex Flint d949871b67 add further comment about backwards-compatible method for setting default values 2022-10-29 15:13:57 -04:00
Alex Flint 9d5e97ac8a drop unnecessary test 2022-10-29 15:12:53 -04:00
Alex Flint 67f7183b85 remove unused textMarshalerType and isTextMarshaler 2022-10-29 15:10:11 -04:00
Alex Flint 522dbbcea8 add test for the new default value parsing logic as it shows up in help messages 2022-10-29 15:08:48 -04:00
Alex Flint 27c832b934 store both a default value and a string representation of that default value in the spec for each option 2022-10-29 14:47:13 -04:00
Alex Flint 197e226c77 drop unnecessary use of templates in this test 2022-10-29 12:28:06 -04:00
Alex Flint 23b2b67fe2 fix issue #184 2022-06-09 11:21:29 -04:00
Alex Flint f0f44b65d1
Merge pull request #175 from alexflint/bracketing-positionals
Fix bracketing for non-required positionals in usage
2022-02-09 18:04:03 -08:00
Alex Flint 5fb236a65d fix bracketing for non-required positionals 2022-02-09 06:31:34 -08:00
Alex Flint d3706100bf
Merge pull request #173 from GreyXor/master
Update testify dependency to 1.7.0
2022-01-05 10:02:04 -05:00
GreyXor 25d4d1c864
Update go.sum 2022-01-05 15:58:54 +01:00
GreyXor 3bf2a5e78a
Update testify dependency to 1.7.0 2022-01-05 15:43:52 +01:00
Alex Flint bf32f08247
Merge pull request #166 from alexflint/env-in-error
Put name of environment variable in error message
2021-10-01 04:44:19 -07:00
Alex Flint b47d6e3da6 put name of environment variable in error message 2021-10-01 04:35:15 -07:00
Alex Flint a4afd6a849
Merge pull request #156 from alexflint/usage-for-subcommands
add FailSubcommand, WriteUsageForSubcommand, WriteHelpForSubcommand
2021-09-18 08:57:29 -07:00
Alex Flint f2f876420c Merge remote-tracking branch 'origin/master' into usage-for-subcommands 2021-09-18 08:55:40 -07:00
Alex Flint 66cb696e79
Merge pull request #164 from evgenv123/evgenv123-patch-1
Update README.md
2021-09-18 08:53:02 -07:00
Alex Flint 0f0b4b5c3f
Update README.md 2021-09-18 08:50:33 -07:00
evgenv123 b157e8d10a
Update README.md
Hi! As a first-time user of your great package I got a little bit confused on using command line args and env vars together, so it took me some time to make testing and I propose to save this time for other people by adding relevant edits to README.md
2021-09-18 22:23:26 +07:00
Alex Flint ff38a63b36
Merge pull request #162 from alexflint/support-for-urls
Add support for URLs
2021-08-20 19:59:18 -07:00
Alex Flint 3d59e5e89e bump go-scalar to v1.1 and add documentation about supported types 2021-08-20 19:52:48 -07:00
Alex Flint eb0393e9bc
Merge pull request #158 from alexflint/unexported-embedded
Recurse into unexported embedded structs
2021-05-24 21:50:33 -07:00
Alex Flint fa12c02e81 recurse into unexported embedded structs 2021-05-24 21:45:11 -07:00
Alex Flint 7cc8da61cf simplify the error string logic 2021-05-09 14:01:08 -07:00
Alex Flint c9b504edc1 add FailSubcommand, WriteUsageForSubcommand, WriteHelpForSubcommand 2021-05-09 13:55:34 -07:00
Alex Flint 679be43af3
Merge pull request #153 from alexflint/test-empty-map
Fix case where an empty environment variable is parsed in a slice or map
2021-04-20 19:11:21 -07:00
Alex Flint 2e81334206 fix case where an environment variable containing an empty string is parsed into a slice or map 2021-04-20 19:09:47 -07:00
Alex Flint 9d937ba6c9
Merge pull request #152 from alexflint/mappings-with-commas
Add an example of mappings with commas
2021-04-20 12:26:56 -07:00
Alex Flint 1e81bb6866 fix the mappings-with-commas example 2021-04-20 12:23:49 -07:00
Alex Flint 4354574615
Merge pull request #151 from alexflint/fix-lint
Fix lint issue in reflect.go
2021-04-20 12:20:36 -07:00
Alex Flint 473453d8c8 fix lint issue 2021-04-20 12:14:14 -07:00
Alex Flint a84487a43a updated the example for mappings with commas 2021-04-19 21:35:09 -07:00
Alex Flint a0937d1b58
Merge pull request #150 from alexflint/push-coverage-up-more
Push test coverage up to 100%
2021-04-19 21:27:53 -07:00
Alex Flint 01a9fab8d7 clean up environment variable tests 2021-04-19 21:22:12 -07:00
Alex Flint fe4a138ac8 test coverage 100% !! 2021-04-19 21:03:43 -07:00
Alex Flint 6a01a15f75
Merge pull request #149 from alexflint/parse-into-map
Add support for parsing into a map
2021-04-19 19:27:31 -07:00
Alex Flint d4b9b2a008 push coverage up even more 2021-04-19 19:23:08 -07:00
Alex Flint a80336128c more test coverage 2021-04-19 14:50:05 -07:00
Alex Flint 57f610284f add an runnable example for mappings 2021-04-19 14:01:29 -07:00
Alex Flint 91214e01ea add an example of parsing into a map to the readme 2021-04-19 13:59:00 -07:00
Alex Flint 0100c0a411 push code coverage up 2021-04-19 13:48:07 -07:00
Alex Flint bb4e7fd4b0 add unittests for maps as environment variables with the separate flag 2021-04-19 13:33:31 -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 f4eb7f3a58
Merge pull request #137 from alexflint/optional-long
Optional long names
2021-04-16 21:03:14 -07:00
Alex Flint 113aef7114
Merge pull request #147 from alexflint/ci-go16
Add go 1.16 to CI
2021-04-16 21:01:28 -07:00
Alex Flint cec6b0d378 add go 1.6 to CI 2021-04-16 20:45:13 -07:00
Alex Flint 172800ff9a fix a comment 2021-04-16 20:44:18 -07:00