Skip to content

Make ErrorList introspectable #1605

Closed
Closed
@lavalamp

Description

From discussion in #1593:

  • Delete the ErrorList.ToError() function
  • Remove errorListInternal, and move its Error() function to be on ErrorList
  • Make a func ToError(errs []error) error function that returns nil if errs is nil, otherwise an ErrorList

I don't feel bad about making folks pass around []error until they want to collapse into a single error, because ErrorList is not really a helpful type at the moment-- it's actually more typing than []error and doesn't offer any features besides ToError.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/cleanupCategorizes issue or PR as related to cleaning up code, process, or technical debt.priority/backlogHigher priority than priority/awaiting-more-evidence.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions