Dan Buch
11915a875d
Build and run `urfave-cli-genflags` via its `Makefile`
...
so that `go.mod` files don't get all confused
2 years ago
Naveen Gogineni
fcb0bce797
Fix failed test
2 years ago
Naveen Gogineni
924ebdaab2
Fix:(issue_1500). Fix slice flag value duplication issue
2 years ago
Naveen Gogineni
ea2893084b
Remove extra 3 spaces in last line
2 years ago
Naveen Gogineni
9a9461928a
Add test coverage for Command.VisibleCommands()
2 years ago
dearchap
a4b7759ad1
Update template.go
...
Co-authored-by: Anatoli Babenia <anatoli@rainforce.org>
2 years ago
Naveen Gogineni
dccd762cbb
Componentize template
2 years ago
Naveen Gogineni
c86805de7c
Add test case
2 years ago
Naveen Gogineni
ae8c5118f2
Fix command help subcommand
2 years ago
Naveen Gogineni
13860a7c4d
Fix:(issue_1505) Fix flag alignment in help
2 years ago
Jakub Nowakowski
b82e628617
Add unit test for GenericFlag Destination parsing
...
The test checks if Destination provided in GenericFlag is being set as
expected.
2 years ago
Jakub Nowakowski
01bdec784f
Set destination in GenericFlag apply function
...
The function was missing destination configuration.
2 years ago
Dan Buch
c5057d195e
Only run generate on go 1.19
2 years ago
Dan Buch
65c98c86ad
Ensure "generate" step runs in CI prior to diff check
2 years ago
Felix Lange
82ea9f70c0
Call FlagStringer in String() method of slice flags
...
The default help template relies on the String() method of Flag
to render the flag. For most flag types, String() indirects through
FlagStringer, so that is the best place to customize flag rendering.
FlagStringer was not called for slice flags because their help output
differs from other flags in two ways: there can be multiple default
values, and the flag name is shown two times to indicate that the flag
can be specified multiple times.
To make multiple values work in the FlagStringer, I simply changed
GetValue() to return all values.
Showing the flag more than once is achieved through a new interface,
DocGenerationSliceFlag, which the FlagStringer uses to decide whether
the flag is a slice flag type.
2 years ago
Anatoli Babenia
4959a9fa9b
Refactor `wrap()` and add test for empty line
2 years ago
Anatoli Babenia
e14dca7a18
Run `go fmt`
2 years ago
Anatoli Babenia
05fb755b6a
wrap: Simplify loop logic
...
Suggested by @julian7
2 years ago
Anatoli Babenia
d3bb381a0b
Fix test for removed trailing whitespace
2 years ago
Anatoli Babenia
a6f5ca69f4
wrap: Avoid trailing whitespace for empty lines
2 years ago
Naveen Gogineni
662deaa57b
Run v2approve
2 years ago
Naveen Gogineni
cf41aab451
Revert changes
2 years ago
Naveen Gogineni
1a31a6e2fc
Revert "Remove all flag interfaces"
...
This reverts commit 268cb973f8
.
2 years ago
Naveen Gogineni
81f9145708
Refactor code
2 years ago
Naveen Gogineni
8227be1fe9
Add tests for command.VisibleFlagCategory
2 years ago
Naveen Gogineni
e62a087117
Run make v2approve
2 years ago
Naveen Gogineni
02613e50be
Fix tests
2 years ago
范广宇
1ada1a1c06
fix: stop automatic sorting for --help
2 years ago
dearchap
f64acc4404
Merge pull request #1502 from dearchap/issue_1500
...
Fix:(issue_1500). Fix slice flag value duplication issue
2 years ago
dearchap
fb23ff4aa2
Merge branch 'main' into issue_1500
2 years ago
dearchap
2a4809f3af
Merge pull request #1506 from dearchap/issue_1505
...
Fix:(issue_1505) Fix flag alignment in help
2 years ago
dearchap
86809cef4b
Merge branch 'main' into issue_1505
2 years ago
dearchap
9166808eb5
Merge pull request #1510 from urfave/v3-porting
...
Porting to v3
2 years ago
dearchap
8f469abc00
Merge pull request #1442 from nkuba/generit-flag-destination-pointer
...
Configure GenericFlag's Destination type as struct not pointer
2 years ago
Naveen Gogineni
67f293a1e5
Revert main_test
2 years ago
Naveen Gogineni
a9c758e55f
Fix compile
2 years ago
Naveen Gogineni
d724a63144
After rebase
2 years ago
Jakub Nowakowski
c472192257
Add unit test for GenericFlag Destination parsing
...
The test checks if Destination provided in GenericFlag is being set as
expected.
2 years ago
Jakub Nowakowski
a2541e0fe4
Set destination in GenericFlag apply function
...
The function was missing destination configuration.
2 years ago
Jakub Nowakowski
891ffb017b
Add DestinationPointer for flags generator
...
In this commit I added a DestinationPointer variable that should be set
if the `Destination` should be configured as a pointer for a specific
flag type. It is expected that Generic type which is an interface will
not be a pointer but a struct. Before this change the code compilation
was failing with `type *Generic is pointer to interface, not interface`.
See https://github.com/urfave/cli/issues/1441
2 years ago
dearchap
b68db8d010
Merge pull request #1504 from urfave/generate-in-ci
...
Ensure "generate" step runs in CI prior to diff check
2 years ago
Naveen Gogineni
194ed2bb9b
Remove extra 3 spaces in last line
2 years ago
Naveen Gogineni
d5a1252ef3
Add test coverage for Command.VisibleCommands()
2 years ago
Naveen Gogineni
05db729d66
Do make v2approve
2 years ago
dearchap
0b2aca7ccc
Update template.go
...
Co-authored-by: Anatoli Babenia <anatoli@rainforce.org>
2 years ago
Naveen Gogineni
8f6acfe15d
Componentize template
2 years ago
Naveen Gogineni
6504da449b
Add test case
2 years ago
Naveen Gogineni
2da6e68555
Fix command help subcommand
2 years ago
Naveen Gogineni
2ee2548476
Fix:(issue_1505) Fix flag alignment in help
2 years ago
dearchap
3c5c3a4aa9
Merge pull request #1508 from fjl/slice-flag-stringer
...
Call FlagStringer in String() method of slice flags
2 years ago