-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
simplify code & correct some typo mistakes #536
Conversation
Codecov Report
@@ Coverage Diff @@
## master #536 +/- ##
=======================================
Coverage 62.12% 62.12%
=======================================
Files 3 3
Lines 404 404
=======================================
Hits 251 251
Misses 93 93
Partials 60 60 Continue to review full report at Codecov.
|
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.
LGTM
cmd/ctr/pprof.go
Outdated
@@ -1,6 +1,7 @@ | |||
package main | |||
|
|||
import ( | |||
"errors" |
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.
github.com/pkg/errors
? (has more features)
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.
@AkihiroSuda I just don't think the original code : "%s" make any sense.
either fmt.Errorf(resp.Status)
or errors.New(resp.Status)
could be more direct and simpler
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.
@kevinetc123 he just means instead of using the stdlib errors
use github.com/pkg/errors
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.
@codecov-io @AkihiroSuda OK, I have replaced the errors
Maybe, make the error message more helpful? |
Signed-off-by: kevinetc123 <kaiwentan@harmonycloud.cn>
@stevvooe I have replaced the stdlib |
LGTM |
Signed-off-by: kevinetc123 kaiwentan@harmonycloud.cn