Documentation ¶
Index ¶
- func CopyMap(m map[string]interface{}) map[string]interface{}
- func MultiCloserAppend(closers ...io.Closer) io.Closer
- func MultiWriterAppend(writers ...io.Writer) (multiWriter io.Writer)
- func SpewJSON(v interface{}) string
- func StructTagName(v reflect.Value, i int, key string) string
- type Buffer
- type MultiErrorGroup
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MultiWriterAppend ¶ added in v0.25.0
Types ¶
type Buffer ¶
type Buffer struct {
// contains filtered or unexported fields
}
Buffer is a thread-safe bytes.Buffer
type MultiErrorGroup ¶ added in v0.25.0
type MultiErrorGroup struct {
// contains filtered or unexported fields
}
MultiErrorGroup is a collection of goroutines working on subtasks that are part of the same overall task.
func MultiErrorGroupWithContext ¶ added in v0.25.0
func MultiErrorGroupWithContext(ctx context.Context) (*MultiErrorGroup, context.Context)
MultiErrorGroupWithContext returns a new Group and an associated Context derived from ctx.
The derived Context is canceled the first time a function passed to Go returns a non-nil error or the first time Wait returns, whichever occurs first.
func (*MultiErrorGroup) Go ¶ added in v0.25.0
func (g *MultiErrorGroup) Go(f func() error)
Go calls the given function in a new goroutine.
The first call to return a non-nil error cancels the group; its error will be returned by Wait.
func (*MultiErrorGroup) Wait ¶ added in v0.25.0
func (g *MultiErrorGroup) Wait() error
Wait blocks until all function calls from the Go method have returned, then returns the all non-nil errors (if any) as a MultiError.