Skip to content

Instantly share code, notes, and snippets.

@davegardnerisme
Created July 3, 2013 09:02
Show Gist options
  • Select an option

  • Save davegardnerisme/5916506 to your computer and use it in GitHub Desktop.

Select an option

Save davegardnerisme/5916506 to your computer and use it in GitHub Desktop.
MultiError
type MultiError struct {
slc []error
}
func NewMultiError() *MultiError {
return &MultiError{make([]error, 0)}
}
func (errs *MultiError) Add(err error) {
errs.slc = append(errs.slc, err)
}
func (errs *MultiError) AnyErrors() bool {
return len(errs.slc) > 0
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment