Skip to content

Instantly share code, notes, and snippets.

@abraithwaite
Created October 24, 2016 19:44
Show Gist options
  • Save abraithwaite/c7f95e954c24ba24e80036fc0d7505f5 to your computer and use it in GitHub Desktop.
Save abraithwaite/c7f95e954c24ba24e80036fc0d7505f5 to your computer and use it in GitHub Desktop.
type ErrorSet []error
func (es ErrorSet) Error() string {
return errors.New("Error(s) encountered while processing. First error encountered was: %v")
}
func (s NodeName) FieldName(errs ErrorSet) FieldType {
...
if err != nil {
errs = append(errs, err)
return FieldType{}
}
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment