gopkg.in/hedzr/errors.v3@v3.3.1/join.go (about) 1 // Copyright © 2023 Hedzr Yeh. 2 3 package errors 4 5 // Join returns an error that wraps the given errors. 6 // Any nil error values are discarded. 7 // Join returns nil if errs contains no non-nil values. 8 // The error formats as the concatenation of the strings obtained 9 // by calling the Error method of each element of errs, with a newline 10 // between each string. 11 func Join(errs ...error) error { 12 return New().WithErrors(errs...) 13 }