package errorhandler import "fmt" // FormatError formats text and the error in a standardized way func FormatError(text string, err error) error { return fmt.Errorf(fmt.Sprintf("%s, error is:\n\t-> %s", text, err)) }