Created
September 24, 2019 16:23
-
-
Save phuctm97/6fbc96891c6069f70d13c2672f42ed60 to your computer and use it in GitHub Desktop.
Go RESTful Series
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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