Alex Flint
bf629a16cb
Merge pull request #231 from alexflint/subcommand-aliases
...
add subcommand aliases
2023-10-10 18:36:46 -04:00
Alex Flint
e7a4f77ed0
add a unittest for an internally messed up subcommand path
2023-10-08 20:24:18 -04:00
Alex Flint
960d38c3ce
add some more tests for subcommand aliases
2023-10-08 20:14:34 -04:00
Alex Flint
0142b0b842
add subcommand aliases
2023-10-08 20:09:05 -04:00
Alex Flint
5ec29ce755
Merge pull request #229 from alexflint/dependabot/go_modules/gopkg.in/yaml.v3-3.0.0
...
Bump gopkg.in/yaml.v3 from 3.0.0-20200313102051-9f266ea9e77c to 3.0.0
2023-09-10 15:05:06 -07:00
dependabot[bot]
8e9f60aafc
Bump gopkg.in/yaml.v3 from 3.0.0-20200313102051-9f266ea9e77c to 3.0.0
...
Bumps gopkg.in/yaml.v3 from 3.0.0-20200313102051-9f266ea9e77c to 3.0.0.
---
updated-dependencies:
- dependency-name: gopkg.in/yaml.v3
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
2023-08-30 13:58:31 +00:00
Alex Flint
660b9045e1
Merge pull request #223 from hhromic/fix-version-flag
...
Improve handling of version flag
2023-07-14 15:52:33 -04:00
Hugo Hromic
c73f38cd54
Improve handling of version flag
...
* Only use/show builtin `--version` flag if args are versioned with a non-empty `Version()`
* If args define a `--version` flag, honor it and disable/hide the builtin version flag
* Only return `ErrVersion` when using the builtin version flag
2023-07-14 20:12:52 +01:00
Alex Flint
463902ef7d
Merge pull request #222 from IljaN/env-only-args
...
Support for parameters which can only be passed via env
2023-07-02 10:07:10 -04:00
Ilja Neumann
259c83fd5a
Remove usage of additional envOnly struct variable
2023-06-29 21:26:34 +02:00
Ilja Neumann
18623d869b
help,usage and error messages and tests
2023-06-03 12:47:47 +02:00
Ilja Neumann
b928a1839a
Parse env-only vars
2023-06-03 09:50:42 +02:00
Ilja Neumann
ccf62e0ffc
don't print env-vars in usage line
2023-06-03 03:33:10 +02:00
Pablo Diaz
5f10667949
fixed tests
2023-06-03 02:39:56 +02:00
Pablo Diaz
c3cac76438
added tests and fixed usage
2023-06-03 02:39:56 +02:00
Pablo Diaz
0280e6e591
ignores short and long parameters
2023-06-03 02:39:42 +02:00
Alex Flint
e25b4707a7
Merge pull request #211 from alexflint/clean-up-osexit-stderr-stdout
...
clean up customizable stdout, stderr, and exit in parser config
2023-02-08 06:56:56 -08:00
Alex Flint
df28e7154b
clean up customizable stdout, stderr, and exit in parser config
2023-02-08 09:49:03 -05:00
Alex Flint
5dbdd5d0c5
Merge pull request #210 from cabuda/master
...
feat: support more env than terminal
2023-02-08 06:13:50 -08:00
duxinlong
efae1938fd
feat: support more env than terminal
...
Change-Id: I7f35e90b8f19f4ea781832885d35e2f1e275207a
2023-02-08 12:01:48 +00:00
Alex Flint
c0a8e20a0a
Merge pull request #205 from dmzkrsk/strict-subgroup-parsing
...
add strict subcommand parsing
2023-01-27 08:35:12 -08:00
Alexey Trofimov
5036dce2d6
fix typo
2023-01-18 11:52:13 +03:00
Alexey Trofimov
cef66fd2f6
add strict subcommand parsing
2023-01-18 11:50:50 +03:00
Alex Flint
727f8533ac
Merge pull request #185 from alexflint/default-value-issue
...
Do not turn values intro strings and then back into values when processing default values
2022-10-29 12:29:07 -07:00
Alex Flint
3489ea5b2e
in a second place: use reflect.Ptr not reflect.Pointer since the latter was added in Go 1.18
2022-10-29 15:23:56 -04:00
Alex Flint
763072452f
use reflect.Ptr not reflect.Pointer since the latter was added in Go 1.18
2022-10-29 15:21:21 -04:00
Alex Flint
3d95a706a6
Merge remote-tracking branch 'origin/master' into default-value-issue
2022-10-29 15:19:23 -04:00
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
dbc2ba5d0c
Merge pull request #198 from daenney/mustparse
...
Implement MustParse on Parser
2022-10-10 08:41:57 -07:00
Daniele Sluijters
4fc9666f79
Implement MustParse on Parse
...
This moves most of the body of the MustParse function into a MustParse
method on a Parser. The MustParse function is now implemented by calling
the MustParse function on the Parser it implicitly creates.
Closes : #194
2022-10-10 17:25:14 +02: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
Alex Flint
23b2b67fe2
fix issue #184
2022-06-09 11:21:29 -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