Skip to content
This repository was archived by the owner on Dec 1, 2021. It is now read-only.
This repository was archived by the owner on Dec 1, 2021. It is now read-only.

Proposal: errors.First(e ...error) error #128

@2buisson

Description

@2buisson

First returns the first non-nil error, otherwise nil. Usefull when a function have to manage multiple independant errors.

reply, criticalErr := request() // very important
logErr := logReply(reply) // not important
writeErr := writeReply(reply) // not that important
return errors.First(criticalErr, writeErr, logErr)

I am willing to submit a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions