9 lines
220 B
Go
9 lines
220 B
Go
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))
|
|
}
|