1
// Utility functions for reporting errors.
10
// AddErrorContext prefixes any error stored in err with text formatted
11
// according to the format specifier. If err does not contain an error,
12
// AddErrorContext does nothing.
13
func AddErrorContext(err *error, format string, args ...interface{}) {
15
*err = errors.New(fmt.Sprintf(format, args...) + ": " + (*err).Error())