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

refactor: Use Var function for flags which don't have shorthand #104

Merged
merged 1 commit into from
Oct 9, 2023

Conversation

johnmanjiro13
Copy link
Owner

VarP of pflag package receive a shorthand.
However, some flags don't need a shorthand, in which case it's better to use Var function.
https://pkg.go.dev/github.com/spf13/pflag#FlagSet.String

@codecov
Copy link

codecov bot commented Oct 9, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (7745851) 53.95% compared to head (7dc32ce) 53.95%.
Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #104   +/-   ##
=======================================
  Coverage   53.95%   53.95%           
=======================================
  Files           5        5           
  Lines         341      341           
=======================================
  Hits          184      184           
  Misses        139      139           
  Partials       18       18           
Files Coverage Δ
root.go 90.90% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@johnmanjiro13 johnmanjiro13 changed the title refactor: Use Var function for flags which doesn't have shorthand refactor: Use Var function for flags which don't have shorthand Oct 9, 2023
@johnmanjiro13 johnmanjiro13 force-pushed the refactor/use-var-withou-shorthand branch from efe84a0 to 7dc32ce Compare October 9, 2023 03:27
@johnmanjiro13 johnmanjiro13 merged commit f058d60 into main Oct 9, 2023
5 checks passed
@johnmanjiro13 johnmanjiro13 deleted the refactor/use-var-withou-shorthand branch October 9, 2023 03:29
@github-actions github-actions bot mentioned this pull request Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant