Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Join ¶
Join returns an error that wraps the given errors. Any nil error values are discarded. Join returns nil if every value in errs is nil. Copied from the golang standard library at https://github.com/golang/go/blob/a5339da341b8f37c87b77c2fc1318d6ecd2331ff/src/errors/join.go#L19 Copyright (c) 2009 The Go Authors. All rights reserved.
The difference with the above implementation resides in how this error formats. The former uses new lines to concatenate errors which is an inconvenience. This implementation formats as the concatenation of the strings obtained by calling the Error method of each element of errs, recursively unwrapping them if necessary, separated by commas and surrounded by brackets.
This is similar as to how the k8s.io apimachinery aggregate error format. However this error is simpler and supports the full wrapping semantics, while k8s.io apimachinery aggregate error doesn't support the 'errors.As'.
Types ¶
This section is empty.