Skip to content

Instantly share code, notes, and snippets.

@phuctm97
Created September 24, 2019 16:23
Show Gist options
  • Save phuctm97/6fbc96891c6069f70d13c2672f42ed60 to your computer and use it in GitHub Desktop.
Save phuctm97/6fbc96891c6069f70d13c2672f42ed60 to your computer and use it in GitHub Desktop.
Go RESTful Series
package common
import "fmt"
// Errors is a collection of errors.
type Errors []error
func (errs Errors) Error() string {
msgs := make([]string, len(errs))
for i, err := range errs {
msgs[i] = err.Error()
}
return fmt.Sprint(msg)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment