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

Only allow constructors #98

Merged
merged 1 commit into from
Jun 12, 2017
Merged

Only allow constructors #98

merged 1 commit into from
Jun 12, 2017

Conversation

akshayjshah
Copy link
Contributor

As discussed in #74, Provide should only take constructors. This not
only cleans up some of dig's internals, but also removes a few ambiguous
cases: providing interfaces (e.g., Tally scopes) and functions now works
exactly the same as providing other types. (Before, they behaved oddly -
functions were assumed to be constructors, and providing an interface
instance would instead provide the concrete type.)

As discussed in #74, Provide should only take constructors. This not
only cleans up some of dig's internals, but also removes a few ambiguous
cases: providing interfaces (e.g., Tally scopes) and functions now works
exactly the same as providing other types. (Before, they behaved oddly -
functions were assumed to be constructors, and providing an interface
instance would instead provide the concrete type.)
@akshayjshah akshayjshah requested review from abhinav, glibsm, HelloGrayson and a user June 11, 2017 04:58
@codecov
Copy link

codecov bot commented Jun 11, 2017

Codecov Report

Merging #98 into master will increase coverage by 0.58%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #98      +/-   ##
==========================================
+ Coverage   96.25%   96.83%   +0.58%     
==========================================
  Files           3        3              
  Lines         267      253      -14     
==========================================
- Hits          257      245      -12     
+ Misses          7        6       -1     
+ Partials        3        2       -1
Impacted Files Coverage Δ
dig.go 97.61% <100%> (+0.74%) ⬆️

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 0b0da34...dfd0bcf. Read the comment docs.

Copy link
Contributor

@HelloGrayson HelloGrayson left a comment

Choose a reason for hiding this comment

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

Much yay

@akshayjshah akshayjshah merged commit fed09d4 into master Jun 12, 2017
@akshayjshah akshayjshah deleted the ajs-constructors branch June 12, 2017 01:00
hbdf pushed a commit to hbdf/dig that referenced this pull request Jul 14, 2022
This enforces the canonical import path and should reduce confusion in
the future.

https://golang.org/cmd/go/#hdr-Import_path_checking
hbdf pushed a commit to hbdf/dig that referenced this pull request Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants