Stringer for ErrClass and ErrCode ? #543

Closed
opened 2020-02-28 22:55:36 -06:00 by slyphon · 1 comment
slyphon commented 2020-02-28 22:55:36 -06:00 (Migrated from github.com)

The functionality might already exist somewhere, but it seems like it'd be useful for error reporting to make a stringer for ErrClass and ErrCode to return human-readable names for the corresponding constants.

It'd mean that go generate would have to be run when the relevant constants were changed, but it seems like this should be relatively easy to do.

Would you accept a pull request that set this up?

The functionality might already exist somewhere, but it seems like it'd be useful for error reporting to make a stringer for ErrClass and ErrCode to return human-readable names for the corresponding constants. It'd mean that `go generate` would have to be run when the relevant constants were changed, but it seems like this should be relatively easy to do. Would you accept a pull request that set this up?
lhchavez commented 2020-02-29 07:18:10 -06:00 (Migrated from github.com)

there's precedent for that (e.g. #523) so PR away!

now that you mention it, it may be worth adding an Action to check whether all the go generated files are up to date. that we can do separately.

there's precedent for that (e.g. #523) so PR away! now that you mention it, it may be worth adding an Action to check whether all the `go generate`d files are up to date. that we can do separately.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: jcarr/git2go#543
No description provided.