-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
FrozenDueToAgeProposalerror-handlingLanguage & library change proposals that are about error handling.Language & library change proposals that are about error handling.v2An incompatible library changeAn incompatible library change
Milestone
Description
Is there anyone else who'd like to see https://github.com/pkg/errors (or similar) being adopted in Go 2.0?
Forked from #21161 (comment).
Example:
func Chdir(dir string) error {
if e := syscall.Chdir(dir); e != nil {
return errors.Wrap(e, "failed to change directory")
}
return nil
}Alternative one-liner example, since errors.Wrap() returns nil on nil error:
func Chdir(dir string) error {
return errors.Wrap(syscall.Chdir(dir), "failed to change directory")
}jellevandenhooff, egorse, drakmaniso, earthboundkid, OneOfOne and 19 morecznic, ucirello, tv42, as, timonwong and 1 moreas
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeProposalerror-handlingLanguage & library change proposals that are about error handling.Language & library change proposals that are about error handling.v2An incompatible library changeAn incompatible library change