File tree Expand file tree Collapse file tree 3 files changed +16
-60
lines changed
Expand file tree Collapse file tree 3 files changed +16
-60
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -5,4 +5,16 @@ package errors
55
66import "errors"
77
8- var Join = errors .Join
8+ // Join returns an error that wraps the given errors.
9+ // Any nil error values are discarded.
10+ // Join returns nil if every value in errs is nil.
11+ // The error formats as the concatenation of the strings obtained
12+ // by calling the Error method of each element of errs, with a newline
13+ // between each string.
14+ //
15+ // A non-nil error returned by Join implements the Unwrap() []error method.
16+ //
17+ // Available only for go 1.20 or superior.
18+ func Join (errs ... error ) error {
19+ return errors .Join (errs ... )
20+ }
Original file line number Diff line number Diff line change 1+ //go:build go1.20
2+ // +build go1.20
3+
14package errors_test
25
36import (
You can’t perform that action at this time.
0 commit comments