Skip to content
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

Merged
merged 1 commit into from
Feb 24, 2017

Conversation

kevinetc123
Copy link
Contributor

Signed-off-by: kevinetc123 kaiwentan@harmonycloud.cn

@codecov-io
Copy link

codecov-io commented Feb 20, 2017

Codecov Report

Merging #536 into master will not change coverage.
The diff coverage is n/a.

@@           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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 660783c...fa58495. Read the comment docs.

Copy link
Member

@samuelkarp samuelkarp left a 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"
Copy link
Member

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)

Copy link
Contributor Author

@kevinetc123 kevinetc123 Feb 20, 2017

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

Copy link
Member

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

Copy link
Contributor Author

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

@stevvooe
Copy link
Member

Maybe, make the error message more helpful?

Signed-off-by: kevinetc123 <kaiwentan@harmonycloud.cn>
@kevinetc123
Copy link
Contributor Author

@stevvooe I have replaced the stdlib errors with pkg\errors and added some help message for that error.

@stevvooe
Copy link
Member

LGTM

@stevvooe stevvooe merged commit 8de7b60 into containerd:master Feb 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants