-
Notifications
You must be signed in to change notification settings - Fork 542
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
fix: nodes format not works #847
Conversation
Codecov Report
@@ Coverage Diff @@
## master #847 +/- ##
==========================================
+ Coverage 42.64% 42.95% +0.31%
==========================================
Files 18 18
Lines 1257 1271 +14
==========================================
+ Hits 536 546 +10
- Misses 630 633 +3
- Partials 91 92 +1
Continue to review full report at Codecov.
|
assert.Equal(t, 1, nodes[0].Weight) | ||
// json encode for client | ||
res, err := json.Marshal(nodes) | ||
assert.Nil(t,err) |
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.
Style: need a space after ,
.
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.
fixed
}` | ||
|
||
// bind struct | ||
var route Route |
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.
Redundant spaces after var
.
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.
fixed
assert.Contains(t, jsonStr, `"weight":0`) | ||
assert.Contains(t, jsonStr, `"port":8080`) | ||
assert.Contains(t, jsonStr, `"host":"127.0.0.1"`) | ||
|
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.
Redundant empty 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.
fixed
"weight": 0 | ||
}] | ||
} | ||
}` |
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.
bad indentation
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.
fixed.
Please answer these questions before submitting a pull request
close #786
close #783
two issues are caused by nodes format