Move Components interface to common package#213
Merged
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
|
added 4 commits
August 19, 2016 09:17
Member
Author
|
@afeld this is ready |
lib/components.go
Outdated
| components.Lock() | ||
| defer components.Unlock() | ||
| added := false | ||
| if _, exists := components.mapping[component.GetKey()]; !exists { |
Member
There was a problem hiding this comment.
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.
Member
Author
|
@afeld this should have touched on everything. and threw in some extra tests too lol |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.