-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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: append, build variable and type switch #4940
Conversation
Blocked till 1.6.0-rc1 is released |
models/user.go
Outdated
@@ -14,6 +14,7 @@ import ( | |||
"errors" | |||
"fmt" | |||
"image" | |||
|
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.
Why space?
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.
See a4f370b
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 months. Thank you for your contributions. |
Please resolve conflicts and sorry for forgetting to review it |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 months. Thank you for your contributions. |
@appleboy conflicts |
@lafriks resolved conflicts. |
isInt = false | ||
} | ||
|
||
switch right := right.(type) { | ||
switch v := right.(type) { |
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.
Could we not refactor this further to get rid of the code duplication completely?
@@ -43,8 +43,7 @@ func TestUpdateAssignee(t *testing.T) { | |||
assert.NoError(t, err) | |||
|
|||
var expectedAssignees []*User | |||
expectedAssignees = append(expectedAssignees, user2) | |||
expectedAssignees = append(expectedAssignees, user3) | |||
expectedAssignees = append(expectedAssignees, user2, user3) |
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.
I think this may changed the tests?
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.
@lunny I don't know what do you mean?
Codecov Report
@@ Coverage Diff @@
## master #4940 +/- ##
==========================================
- Coverage 41.43% 41.43% -0.01%
==========================================
Files 442 442
Lines 59693 59692 -1
==========================================
- Hits 24735 24733 -2
- Misses 31721 31722 +1
Partials 3237 3237
Continue to review full report at Codecov.
|
* refactor: append, build variable and type switch * fix: remove redundant space.
append
chains to the same slice that can be done in a singleappend
call