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
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
6491ddec12
Merge pull request #1503 from urfave/rm-nonexistent-phonies
...
Remove nonexistent phony targets
2022-09-29 20:43:05 -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
Wendell Sun
b33117618a
Rebase main, update flag-spec.yaml to add Action field
2022-09-16 00:38:20 +09:00
Wendell Sun
602471bf21
Add more tests about flag-level action
2022-09-16 00:07:15 +09:00
Wendell Sun
619958c3d2
Add ActionableFlag interface instead of modifying Flag interface directly
2022-09-16 00:07:14 +09:00
Wendell Sun
14366f7030
feat: flag action
2022-09-16 00:07:12 +09:00
dearchap
880a802dc8
Merge pull request #1495 from dearchap/issue_1197
...
Fix:(issue_1197) Set destination field from altsrc for slice flags
2022-09-15 07:15:04 -04:00
Naveen Gogineni
c8dc60b5e6
Add unit tests
2022-09-12 13:40:37 -04:00
Naveen Gogineni
9e51113ba4
Fix:(issue_1197) Set destination field from altsrc for slice flags
2022-09-12 13:40:37 -04:00
9120e06825
Merge pull request #1493 from urfave/fix-mkdocs-remote
...
Accept the `MKDOCS_REMOTE_GITHUB_TOKEN` var as intended
2022-09-12 10:15:51 -04:00
9eea32aacd
Accept the MKDOCS_REMOTE_GITHUB_TOKEN
var as intended
2022-09-12 07:33:08 -04:00
69f4122db9
Merge pull request #1490 from urfave/maint-build-cleanups
...
Move more functionality into internal/build/build.go
2022-09-12 07:24:15 -04:00
a425337371
Use correct env var for global flags
2022-09-11 18:34:13 -04:00
7d9264aea1
Replace a few more custom make targets
2022-09-11 18:32:04 -04:00
1a851c7ac9
Only run make v2diff
on go 1.19.x
+ ubuntu-latest
2022-09-11 18:22:43 -04:00
da7efeb63b
Use windows compatible path append
2022-09-11 16:37:56 -04:00
ff1138c969
Run make target after the Makefile is available
2022-09-11 16:12:16 -04:00
12a3c62e50
Move more functionality into internal/build/build.go
...
and use make targets in CI, pass flag spec YAML through yq
includes result of running `make v2approve`
2022-09-11 16:02:48 -04:00
dearchap
375e5dfc1d
Merge pull request #1489 from dearchap/fix_help_name_consistency
...
Fix: Help name consistency among app/commands and subcommands
2022-09-11 15:00:44 -04:00
Naveen Gogineni
8339b59554
Fix: Help name consistency among app/commands and subcommands
2022-09-11 10:21:56 -04:00
dearchap
8dba5c3eb3
Merge pull request #1488 from dearchap/no_dest_ptr
...
Fix: dont generate pointer for dest for Generic flag
2022-09-10 20:27:04 -04:00
Naveen Gogineni
15491d6f91
Fix: dont generate pointer for dest for Generic flag
2022-09-10 18:03:30 -04:00
6124f3ad9e
Merge pull request #1486 from urfave/codecov-threshold-tweaks
...
Set codecov status thresholds to 5%
2022-09-10 13:12:32 -04:00
ee4ff8f8ff
Set codecov status thresholds to 5%
...
and rename file to be less dotty
2022-09-10 10:29:41 -04:00
dearchap
d62ac9c02e
Merge pull request #1378 from dearchap/issue_1334
...
Feature:(Issue 1334) Add support for uint64slices
2022-09-10 09:41:46 -04:00
Naveen Gogineni
d0fff2e8cc
Add additional test to fix codecov
2022-09-10 09:36:30 -04:00
Naveen Gogineni
b087856c64
Add additional test to fix codecov
2022-09-10 09:27:33 -04:00
Naveen Gogineni
4f9b8e4667
Add coverage threshold
2022-09-10 08:55:33 -04:00
Naveen Gogineni
f6b4ee0e78
Merge from main
2022-09-10 08:55:33 -04:00
Naveen Gogineni
0c7dcf7c2b
Fix formatting
2022-09-10 08:55:33 -04:00