11915a875d
Build and run urfave-cli-genflags
via its Makefile
...
so that `go.mod` files don't get all confused
2022-10-09 11:25:02 -04:00
dearchap
f64acc4404
Merge pull request #1502 from dearchap/issue_1500
...
Fix:(issue_1500). Fix slice flag value duplication issue
2022-10-06 11:20:29 -04:00
dearchap
fb23ff4aa2
Merge branch 'main' into issue_1500
2022-10-06 11:07:28 -04:00
dearchap
2a4809f3af
Merge pull request #1506 from dearchap/issue_1505
...
Fix:(issue_1505) Fix flag alignment in help
2022-10-06 11:06:25 -04:00
dearchap
86809cef4b
Merge branch 'main' into issue_1505
2022-10-06 11:06:10 -04:00
dearchap
8f469abc00
Merge pull request #1442 from nkuba/generit-flag-destination-pointer
...
Configure GenericFlag's Destination type as struct not pointer
2022-10-05 22:21:27 -04:00
Naveen Gogineni
67f293a1e5
Revert main_test
2022-10-05 22:18:45 -04:00
Naveen Gogineni
a9c758e55f
Fix compile
2022-10-05 22:15:43 -04:00
Naveen Gogineni
d724a63144
After rebase
2022-10-05 22:10:22 -04:00
Jakub Nowakowski
c472192257
Add unit test for GenericFlag Destination parsing
...
The test checks if Destination provided in GenericFlag is being set as
expected.
2022-10-05 22:04:46 -04:00
Jakub Nowakowski
a2541e0fe4
Set destination in GenericFlag apply function
...
The function was missing destination configuration.
2022-10-05 22:04:46 -04:00
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
2022-10-05 22:04:46 -04:00
dearchap
b68db8d010
Merge pull request #1504 from urfave/generate-in-ci
...
Ensure "generate" step runs in CI prior to diff check
2022-10-05 20:33:29 -04:00
Naveen Gogineni
194ed2bb9b
Remove extra 3 spaces in last line
2022-10-05 20:26:45 -04:00
Naveen Gogineni
d5a1252ef3
Add test coverage for Command.VisibleCommands()
2022-10-05 20:26:45 -04:00
Naveen Gogineni
05db729d66
Do make v2approve
2022-10-05 20:26:45 -04:00
dearchap
0b2aca7ccc
Update template.go
...
Co-authored-by: Anatoli Babenia <anatoli@rainforce.org>
2022-10-05 20:26:45 -04:00
Naveen Gogineni
8f6acfe15d
Componentize template
2022-10-05 20:26:45 -04:00
Naveen Gogineni
6504da449b
Add test case
2022-10-05 20:26:45 -04:00
Naveen Gogineni
2da6e68555
Fix command help subcommand
2022-10-05 20:26:45 -04:00
Naveen Gogineni
2ee2548476
Fix:(issue_1505) Fix flag alignment in help
2022-10-05 20:26:45 -04:00
dearchap
3c5c3a4aa9
Merge pull request #1508 from fjl/slice-flag-stringer
...
Call FlagStringer in String() method of slice flags
2022-10-05 20:25:01 -04:00
Felix Lange
5ff1c8dc91
Merge branch 'main' into slice-flag-stringer
2022-10-05 19:53:02 +02:00
Naveen Gogineni
a27294dcd0
Run make v2approve
2022-10-05 09:37:31 -04:00
Naveen Gogineni
2da03245be
Fix failed test
2022-10-05 09:36:22 -04:00
Naveen Gogineni
fe6f62b9b2
Fix:(issue_1500). Fix slice flag value duplication issue
2022-10-05 09:36:22 -04:00
dearchap
8335f5435f
Merge pull request #1513 from abitrolly/patch-1
...
wrap: Avoid trailing whitespace for empty lines
2022-10-05 08:33:35 -04:00
Anatoli Babenia
15b278907e
Refactor wrap()
and add test for empty line
2022-10-04 13:13:52 +03:00
Anatoli Babenia
359e5a8d84
Run go fmt
2022-10-04 10:40:11 +03:00
Anatoli Babenia
1d2696072f
wrap: Simplify loop logic
...
Suggested by @julian7
2022-10-04 10:30:31 +03:00
Anatoli Babenia
59d580978e
Fix test for removed trailing whitespace
2022-10-03 19:05:46 +03:00
Anatoli Babenia
3f7774aaa3
wrap: Avoid trailing whitespace for empty lines
2022-10-03 18:53:26 +03:00
Felix Lange
72cbb3db6a
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.
2022-09-30 15:01:22 +02:00
507530d5f7
Merge branch 'main' into generate-in-ci
2022-09-29 20:51:19 -04:00
d4a5c397f4
Accept current godoc for v2
2022-09-29 20:46:53 -04:00
cb040b67a0
Only run generate on go 1.19
2022-09-29 20:44:37 -04:00
6491ddec12
Merge pull request #1503 from urfave/rm-nonexistent-phonies
...
Remove nonexistent phony targets
2022-09-29 20:43:05 -04:00
38abd8db41
Ensure "generate" step runs in CI prior to diff check
2022-09-29 11:31:40 -04:00
ac4e5143d2
Remove nonexistent phony targets
...
so that running `make` or `make all` only runs targets that exist.
2022-09-29 11:24:42 -04:00
dearchap
de83493182
Merge pull request #1499 from dearchap/issue_557
...
Fix help results inconsistency
2022-09-23 08:15:07 -04:00
dearchap
a81e201383
Merge pull request #1337 from xwjdsh/feat/flag-action
...
Flag-level Action
2022-09-22 07:43:28 -04:00
Naveen Gogineni
d6395333f1
Remove un-needed func
2022-09-21 18:28:31 -04:00
Naveen Gogineni
aecd7c159a
Remove un-needed func
2022-09-21 18:28:31 -04:00
Naveen Gogineni
4c9651575c
Approval for public API change
2022-09-21 18:28:31 -04:00
Naveen Gogineni
e925d26b97
Fix:(issue_557) Make help output consistent between different invocations
2022-09-21 18:28:31 -04:00
Naveen Gogineni
0ee87b411a
Fix:(issue_557) Change app help name
2022-09-21 18:28:31 -04:00
dearchap
9f465af482
Merge pull request #1497 from Torwang1/main
...
fix: Context.Set no such flag
2022-09-20 20:16:49 -04:00
torwang
3005438a1f
fix: Context.Set no such flag
2022-09-20 16:15:59 +08:00
Wendell Sun
47f6782a90
Add more test cases
2022-09-17 16:05:26 +09:00
Wendell Sun
7570aace82
make v2approve
2022-09-16 00:42:24 +09:00