noisersup
15aa6d8d4e
Fix Readme.md
2022-09-17 15:11:48 +10:00
Michal Kralik
3371bd6167
fix: go1.19 specific tests for text wrapping
2022-08-26 18:53:26 +10:00
pyqlsa
f48da244f5
change VersionFlag to a BeforeReset hook
2022-07-28 16:15:07 +10:00
pyqlsa
a05a0c20ba
Add Active member to Nodes and Values ( #319 )
2022-07-19 22:43:15 -07:00
Michal Kralik
f9bc630ef8
Panic on duplicate command names ( #317 )
2022-07-17 02:31:21 -07:00
Alec Thomas
81070a043b
fix: os-specific builds
2022-06-21 22:36:59 +10:00
Alec Thomas
e75e1ca88a
refactor: switch to alecthomas/assert
2022-06-21 20:58:10 +10:00
Alec Thomas
0066abb973
fix: Reset() should always be called before anything else
2022-06-15 20:45:10 +10:00
pyq-lsa
edc47ebc34
helpful error message when flag is missing values ( #310 )
...
Fixes #277
2022-06-11 14:29:19 -07:00
James Lamb
9d72e94240
Update yaml v3 to v3.0.1 to fix CVE 2022 28948 ( #309 )
2022-06-09 19:16:25 -07:00
Keilin Olsen
195d56c42e
Remove references to flag HelpProviders
...
As these don't appear to be currently supported, remove references
to them working (from main README)
2022-05-18 01:07:21 -07:00
Keilin Olsen
6042c4b10e
Add example of HelpProvider + README
...
Relocate detailed help docs to main README
2022-05-18 01:07:21 -07:00
Keilin Olsen
1db2ea27af
Move old shell/main to subdirectory
...
Also update README reference to same
2022-05-18 01:07:21 -07:00
pyq-lsa
0aaa4c1199
fix: existing file/dir always checks default
...
updated existing file/dir mappers to early return if already set;
added tests for existing file/dir mappers;
2022-05-16 15:37:38 -07:00
David Shiflet
3c2164486d
fix linux build
2022-05-16 14:14:04 -07:00
David Shiflet
29685e7da6
treat \ as escape only before a separator
2022-05-16 13:03:54 -07:00
pyq-lsa
5538b7f045
change help hook and call Reset later
...
change to BeforeResolve hook to catch calls to '--help' earlier;
call reset later in Kong.Parse() to allow help hook to get hooked;
add test;
2022-05-03 00:10:19 -07:00
Alec Thomas
7c6ff10d33
fix: values that look like flags would not be parsed correctly
...
Specifically, when parsing into slices or maps.
Fixes #290
2022-04-08 06:43:08 +10:00
Alec Thomas
556f8b773b
chore: pin Go-1.17.8
2022-03-18 18:56:02 +11:00
Denis Titusov
89b2806f6a
Switch to the standard errors API, that was introduced in 1.13 ( #273 )
...
* Switch to the standard errors API, that was introduced in 1.13
* Fix linter errors 🤦
* Remove withStackError
* fix: freeze go version to 1.17, since 1.18 introduced generics, which are not supported by linters yet
* fix: freeze go version to 1.17, since 1.18 introduced generics, which are not supported by linters yet
2022-03-18 18:54:29 +11:00
Alec Thomas
7a63525420
feat: AutoGroup option
2022-03-11 22:51:12 +11:00
hasheddan
1939f2cda0
Remove extraneous + in README.md
...
Removes + characters that were included from a previous diff.
Signed-off-by: hasheddan <georgedanielmangum@gmail.com >
2022-02-27 11:14:26 +11:00
Ali Eren Öztürk
cc81f03a38
Support listing enums in specified order ( #274 )
2022-02-21 21:36:14 +11:00
Alec Thomas
72024dd44a
fix: hydrate pointer fields
...
It is a mystery how this has been a bug for so long.
2022-02-16 13:26:29 +11:00
pyq-lsa
ab085f771e
fix required/xor behavior w/ > 2 flags
2022-01-30 09:13:18 +11:00
Denis Titusov
e49700181c
fix: Change the application flags order avoiding panics
...
This commit solves issue alecthomas/kong#264
2022-01-27 22:52:55 +11:00
leon332157
38c56226ba
fix: correct line number for json example ( #265 )
2022-01-25 07:45:25 +11:00
Alec Thomas
3987efba86
fix: issue with symlinked temp dirs
2022-01-05 20:01:51 +11:00
Mitar
a7d3850e80
Cmd can be passthrough now, too.
...
Fixes #253 .
2022-01-05 18:58:37 +11:00
Mitar
76d5ed9ac1
Small improvements to ChangeDirFlag.
2022-01-04 08:29:23 +11:00
Mitar
f5bd1465d8
Add ChangeToFlag to allow changing the current working directory.
2022-01-03 15:47:31 +11:00
Mitar
88dcc90dde
Document nested data structure.
2021-12-25 07:49:21 +11:00
Alec Thomas
7533b11d06
Differentiate between omitted and empty default.
...
Fixes #250 .
2021-12-13 19:03:23 +11:00
Alec Thomas
9c9b8ab50b
More enum fixes.
2021-12-13 18:54:06 +11:00
Alec Thomas
fa08e7027c
fix: overly enthusiastic validation of tags
2021-12-13 16:48:21 +11:00
Mitar
ece1f6d8cb
Allow more flexible callback return error type.
2021-12-13 12:00:13 +11:00
Mitar
deebf0b09b
Do not add environment variable to help it is already present.
...
Fixes #246 .
2021-12-05 06:23:18 +11:00
Alec Thomas
32b2f740c9
Support $$ for escaping $ in interpolated values.
...
Fixes #248
2021-12-04 21:06:33 +11:00
Alec Thomas
c5e464a367
Deprecate HelpFormatter.
2021-12-03 11:48:54 +11:00
Mitar
c3703cda7e
Fix that default should not override the placeholder.
...
Fixes #243 .
2021-12-02 23:06:44 +11:00
Alec Thomas
d564bd286f
Add test for #244 .
2021-12-02 12:59:34 +11:00
Alec Thomas
342263cb51
Fix docs re. Help() interface.
...
Fixes #241 .
2021-11-30 21:39:35 +11:00
Colin
ff839dc6db
Fix env var interpolation ( #236 )
2021-11-24 13:57:08 +11:00
Nate Parsons
f00d33b57c
Use reflect-compatible struct tags in examples
2021-11-23 15:19:08 +11:00
Colin
79f896f0c0
feat: add support for variable interpolation into env tag key ( #234 )
2021-11-19 08:56:39 +11:00
Connor Hindley
5090305bcb
Add help testcase for envprefix + no env.
2021-11-19 06:22:36 +11:00
Connor Hindley
ea18c73f11
Only prepend EnvPrefix if .Env is not empty.
...
Before this change the EnvPrefix was applied to fields without env
specified, which resulted in strange and confusing help output.
2021-11-19 06:22:36 +11:00
Dan
2770a34ce6
Add envprefix tag
2021-10-22 16:25:13 +11:00
Grant Monroe
749d3f0752
Allow root application to have a Run(...) error method.
...
Issue #209
2021-10-15 15:47:17 +11:00
Alec Thomas
5c7b038540
Rename IgnoreFieldsRegex -> IgnoreFields.
2021-09-27 16:31:54 +10:00