clienterrors: rename WorkerClientError to clienterrors.New
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.
This commit is contained in:
parent
09445a1030
commit
573b349f16
19 changed files with 188 additions and 188 deletions
|
|
@ -636,7 +636,7 @@ func TestDepsolveLegacyErrorConversion(t *testing.T) {
|
|||
Error: reason,
|
||||
ErrorType: errType,
|
||||
JobResult: worker.JobResult{
|
||||
JobError: clienterrors.WorkerClientError(clienterrors.ErrorDNFDepsolveError, reason, nil),
|
||||
JobError: clienterrors.New(clienterrors.ErrorDNFDepsolveError, reason, nil),
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue