-
Notifications
You must be signed in to change notification settings - Fork 107
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
clienterrors: rename WorkerClientError
to clienterrors.New
#4143
Conversation
This PR is stale because it has been open 30 days with no activity. Remove "Stale" label or comment or this will be closed in 7 days. |
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.
yes please!
@mvo5 do you mind if I push to your branch with the rebase? |
The usual convention to create new object is to prefix `New*` so this commit renames the `WorkerClientError`. Initially I thought it would be `NewWorkerClientError()` but looking at the package prefix it seems unneeded, i.e. `clienterrors.New()` already provides enough context it seems and it's the only error we construct. We could consider renaming it to `clienterror` (singular) too but that could be a followup. I would also like to make `clienterror.Error` implement the `error` interface but that should be a followup to make this (mechanical) rename trivial to review.
Sorry for the slow reply, I rebased and pushed now, sorry that I did not see the conflicts earlier. And thanks for the kind offer to do it for me, that is of course always welcome too :) |
WorkerClientError
to clienterrors.New
WorkerClientError
to clienterrors.New
This PR is stale because it has been open 30 days with no activity. Remove "Stale" label or comment or this will be closed in 7 days. |
This PR was closed because it has been stalled for 30+7 days with no activity. |
The usual convention to create new object is to prefix
New*
so this commit renames theWorkerClientError
. Initially I thought it would beNewWorkerClientError()
but looking at the package prefix it seems unneeded, i.e.clienterrors.New()
already provides enough context it seems and it's the only error we construct.We could consider renaming it to
clienterror
(singular) too but that could be a followup.I would also like to make
clienterror.Error
implement theerror
interface but that should be a followup to make this (mechanical) rename trivial to review.Note that the rename was done via
so choosing a different name it "cheap".