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

Remove unused empty Options structs #278

Merged
merged 1 commit into from
Oct 1, 2018
Merged

Conversation

imjasonh
Copy link
Collaborator

Lots of packages included empty FooOptions structs which we could use to allow callers to pass optional options to the methods.

In practice, these didn't add anything and just added a wart. Users had to pass foo.FooOptions{}, or &foo.FooOptions{}, or nil to lots of random methods. We weren't consistent about whether options should be accepted as a pointer or not, or whether absence of options should be expressed as a pointer to an empty struct, or nil.

If these methods want to add options in the future, they should do so using functional options, where we can add more options to the method args directly without breaking existing callers.

@codecov-io
Copy link

Codecov Report

Merging #278 into master will decrease coverage by 0.01%.
The diff coverage is 77.77%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #278      +/-   ##
==========================================
- Coverage      55%   54.98%   -0.02%     
==========================================
  Files          58       58              
  Lines        2498     2497       -1     
==========================================
- Hits         1374     1373       -1     
  Misses        907      907              
  Partials      217      217
Impacted Files Coverage Δ
cmd/ko/resolve.go 0% <0%> (ø) ⬆️
pkg/ko/publish/default.go 70.58% <0%> (ø) ⬆️
cmd/ko/publish.go 9.3% <0%> (ø) ⬆️
pkg/v1/mutate/rebase.go 47.82% <100%> (ø) ⬆️
pkg/v1/daemon/write.go 47.82% <100%> (ø) ⬆️
pkg/v1/remote/write.go 66.04% <100%> (-0.21%) ⬇️
pkg/v1/tarball/write.go 67.12% <100%> (ø) ⬆️
pkg/v1/remote/delete.go 68% <100%> (ø) ⬆️
pkg/ko/publish/daemon.go 60% <66.66%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 52f3c54...f55725c. Read the comment docs.

Copy link
Collaborator

@jonjohnsonjr jonjohnsonjr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, want to update all our dependents, too? 😄

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.

3 participants