Alex Flint
c046f49e12
drop go.work and add it to .gitignore
2022-10-29 15:28:22 -04:00
Alex Flint
f2539d7ad2
add go.work -- maybe remove before merge?
2022-10-29 12:28:46 -04:00
Alex Flint
2ffe24630b
add mdtest command to generate and run tests from a markdown file
2022-10-07 14:14:01 -07:00
Alex Flint
47ff44303f
drop support for help tag inside arg tag
2022-10-07 12:51:55 -07:00
Alex Flint
60a0117880
update readme for v2 (still has some TODOs)
2022-10-07 12:51:27 -07:00
Alex Flint
55d9025329
rename "accumulatedArgs" -> "accessible"
2022-10-04 13:54:53 -07:00
Alex Flint
0769dd5839
add tests for new Process* and OverwriteWith* functions
2022-10-04 13:51:51 -07:00
Alex Flint
84b7154efc
add TestSliceWithEqualsSign
2022-10-04 13:25:01 -07:00
Alex Flint
1cc263f9f2
add processSequence and make it responsible for respecting "overwrite"
2022-10-04 13:23:57 -07:00
Alex Flint
b365ec0781
add processSingle and make it responsible for checking whether an argument has been seen before
2022-10-04 13:12:38 -07:00
Alex Flint
64288c5521
add appendToSlice, appendToMap, appendToSliceOrMap
2022-10-04 12:48:04 -07:00
Alex Flint
2775f58376
add OverwriteWithOptions, OverwriteWithCommandLine
2022-10-04 12:34:53 -07:00
Alex Flint
5f0c48f092
move construction logic out of parse.go into construct.go
2022-10-04 11:54:22 -07:00
Alex Flint
5ca19cd72d
cleaned up the test helpers parse, pparse, and parseWithEnv: now all are just using "parse"
2022-10-04 11:39:58 -07:00
Alex Flint
4aea783023
changed NewParser to take options at the end rather than config at the front
2022-10-04 11:28:34 -07:00
Alex Flint
a1e2b672ea
add a test to check that default values can be ignored if needed
2022-10-04 11:06:19 -07:00
Alex Flint
22f214d7ed
added test that library does not directly access environment variables from OS
2022-10-04 11:02:57 -07:00
Alex Flint
09d28e1195
split the parsing logic into ProcessEnvironment, ProcessCommandLine, ProcessOptions, ProcessPositions, ProcessDefaults
2022-10-04 11:00:42 -07:00
Alex Flint
2e6284635a
drop support for multiple destination structs
2022-10-04 08:56:31 -07:00
Alex Flint
11f9b624a9
Merge pull request #196 from alexflint/bump_go_versions
...
Update to latest version of Go in CI
2022-10-02 13:17:43 -07:00
Alex Flint
7f4979a06e
update to latest 3 versions of Go for CI
2022-10-02 13:16:32 -07:00
Alex Flint
0c21f821f8
Merge pull request #195 from alexflint/bump_scalar_dep
...
Update to latest go-scalar
2022-10-02 13:07:36 -07:00
Alex Flint
ea0f540c40
update to latest go-scalar, add test for hex, oct, and binary integer literals
2022-10-02 13:05:04 -07:00
Alex Flint
74af96c6cc
Merge pull request #191 from SebastiaanPasterkamp/add-epilog-to-help
...
Feat: Add epilogue after help text
2022-09-27 12:48:05 -07:00
Sebastiaan Pasterkamp
c8b9567d1b
Feat: Add epilog after help text
...
Similar to the Description at the top of the
help text an Epilog is added at the bottom.
Resolves #189
2022-09-17 12:55:00 +02:00
Alex Flint
ebd7a68a06
Merge pull request #172 from SebastiaanPasterkamp/ignore-default-option
...
Add 'IgnoreDefault' option
2022-06-11 09:06:03 -04:00
Sebastiaan Pasterkamp
b48371a62f
Simplify sub-command initialization w/o IgnoreDefault
2022-06-05 17:54:46 +02: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
Sebastiaan Pasterkamp
a87d80089a
Add 'IgnoreDefault' option
2022-01-02 15:17:09 +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