package
1.24.0
Repository: https://github.com/elastic/cloud-sdk-go.git
Documentation: pkg.go.dev

# Functions

JSONFormatFunc takes in a list of errors and encodes each error to JSON.
NewJSONPrefixed returns a new pointer to Prefixed with the right config for JSON packed errors to not be prefixed.
NewPrefixed creates a new pointer to Prefixed.
WithFormat is convenient a helper to modify the multierror format function to the JSON format, if the format isn't "json", then the unmodified error is returned.
WithFormatFunc takes in an error and tries to set the ErrorFormatFunc to the passed function if the error is of type *Prefixed or *multierror.Error, otherwise it returns the error as is.

# Structs

JSONError wraps a list of errors to be encoded in JSON format.
Prefixed is a multierror which will prefix the error output message with the specified prefix.

# Type aliases

FormatFunc defines a format function which should format a slice of errors into a string.