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

Reworking value source API #1760

Merged
merged 10 commits into from
Jun 19, 2023
Merged

Reworking value source API #1760

merged 10 commits into from
Jun 19, 2023

Conversation

meatballhat
Copy link
Member

@meatballhat meatballhat commented Jun 17, 2023

What type of PR is this?

  • cleanup
  • feature

What this PR does / why we need it:

Reworking the "flag value source" API in prep for ensuring urfave/cli-altsrc can be easily used with urfave/cli/v3 by:

  • reducing the surface area by keeping the environment variable and file implementations private
  • generalizing to "value source" in name
  • using the stdlib fmt.Stringer and fmt.GoStringer interfaces
  • switching the value source interface to use Lookup to mimic stdlib semantics such as os.Lookup

Connected to #1531

in prep for urfave/cli-altsrc re-integration
@meatballhat meatballhat added kind/feature describes a code enhancement / feature request kind/cleanup describes internal cleanup / maintaince area/v3 relates to / is being considered for v3 labels Jun 17, 2023
@meatballhat meatballhat added this to the Release 3.x milestone Jun 17, 2023
value_source_test.go Outdated Show resolved Hide resolved
@dearchap
Copy link
Contributor

@meatballhat When you say "reintegration with altsrc" do you mean just have the API compatible with altsrc or actually pulling the alstrc codebase back into this repo ?

@meatballhat
Copy link
Member Author

@meatballhat When you say "reintegration with altsrc" do you mean just have the API compatible with altsrc or actually pulling the alstrc codebase back into this repo ?

@dearchap I definitely do not mean bringing the altsrc codebase back here 😅 I'll update the description 👍🏼

@meatballhat meatballhat marked this pull request as ready for review June 19, 2023 02:17
@meatballhat meatballhat requested a review from a team as a code owner June 19, 2023 02:17
@meatballhat meatballhat requested a review from dearchap June 19, 2023 02:17
@meatballhat meatballhat merged commit f531a7e into main Jun 19, 2023
@meatballhat meatballhat deleted the value-source-rework branch June 19, 2023 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/v3 relates to / is being considered for v3 kind/cleanup describes internal cleanup / maintaince kind/feature describes a code enhancement / feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants