Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Porting changes from main to v3-dev-main (circa 2022-10-09) #1525

Merged
merged 25 commits into from Oct 16, 2022

Conversation

meatballhat
Copy link
Member

@meatballhat meatballhat commented Oct 9, 2022

What type of PR is this?

  • maintenance

What this PR does / why we need it:

Porting changes from main to v3-dev-main

Closes #1524

@meatballhat meatballhat added the kind/maintenance about releasing / CI / Github / other kind of "meta" project maintenance work label Oct 9, 2022
fjl and others added 20 commits October 9, 2022 09:50
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.
The function was missing destination configuration.
The test checks if Destination provided in GenericFlag is being set as
expected.
Co-authored-by: Anatoli Babenia <anatoli@rainforce.org>
so that `go.mod` files don't get all confused
@meatballhat meatballhat marked this pull request as ready for review October 14, 2022 11:28
@meatballhat meatballhat requested a review from a team as a code owner October 14, 2022 11:28
@meatballhat meatballhat merged commit 25897ce into v3-dev-main Oct 16, 2022
@meatballhat meatballhat deleted the v3-porting branch October 16, 2022 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/maintenance about releasing / CI / Github / other kind of "meta" project maintenance work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants