-
Notifications
You must be signed in to change notification settings - Fork 1.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
Replace fmt.Errorf with errors.Errorf #3627
Conversation
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.
Reviewed 5 of 50 files at r1.
Reviewable status: 5 of 50 files reviewed, 3 unresolved discussions (waiting on @campoy, @danielmai, and @martinmr)
conn/pool.go, line 39 at r2 (raw file):
ErrNoConnection = errors.Errorf("No connection exists") // ErrUnhealthyConnection indicates the connection to a node is unhealthy. ErrUnhealthyConnection = errors.Errorf("Unhealthy connection")
These should be errors.New
technically ... but I don't think it matters much, tbh
dgraph/cmd/alpha/http.go, line 108 at r2 (raw file):
uintVal, err := strconv.ParseUint(value, 0, 64) if err != nil { return 0, errors.Errorf("Error: %+v while parsing %s as uint64", err, name)
These should be replaced with errors.Wrapf(err, "could not parse %q as unit64", name)
And same for all the other fmt.Errorf
which embed an error.
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.
Reviewable status: 4 of 50 files reviewed, 3 unresolved discussions (waiting on @campoy, @danielmai, and @golangcibot)
conn/pool.go, line 39 at r2 (raw file):
Previously, campoy (Francesc Campoy) wrote…
These should be
errors.New
technically ... but I don't think it matters much, tbh
Just changed this since they are typed errors. I left the rest as-is.
dgraph/cmd/alpha/http.go, line 108 at r2 (raw file):
Previously, campoy (Francesc Campoy) wrote…
These should be replaced with
errors.Wrapf(err, "could not parse %q as unit64", name)
And same for all the other
fmt.Errorf
which embed an error.
Done.
dgraph/cmd/migrate/table_guide.go, line 24 at r1 (raw file):
Previously, golangcibot (Bot from GolangCI) wrote…
File is not
gofmt
-ed with-s
(fromgofmt
)
Done.
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.
Reviewed 44 of 50 files at r1, 1 of 1 files at r2, 22 of 22 files at r3.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @campoy, @danielmai, and @golangcibot)
Fixes #3449
This change is