-
Notifications
You must be signed in to change notification settings - Fork 82
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
Move Components interface to common package #213
Conversation
This patch moves the components interface to the common package Also, it get rids of the GetAndApply function that passes a callback This patch does not unexport all the functions because the workspace interface has not been created yet. Will come in another PR
Current coverage is 92.03% (diff: 95.74%)@@ master #213 diff @@
==========================================
Files 26 27 +1
Lines 888 879 -9
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
- Hits 822 809 -13
- Misses 52 56 +4
Partials 14 14
|
@afeld this is ready |
components.Lock() | ||
defer components.Unlock() | ||
added := false | ||
if _, exists := components.mapping[component.GetKey()]; !exists { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While I know this isn't unusual for Go, I'm personally not a fan of cramming assignment plus a check into a conditional. I favor one thing per line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
@afeld this should have touched on everything. and threw in some extra tests too lol |
This patch is just #212 broken into smaller pieces
This patch moves the components interface to the common package
Also, it get rids of the GetAndApply function that passes a callback
Also, it adds the mock for the component
This patch does not unexport all the functions because the workspace
interface has not been created yet. Will come in another PR
A future PR will introduce instructions on how to generate the mocks.