errorhandler/main.go

9 lines
220 B
Go
Raw Normal View History

2023-03-21 18:21:57 +00:00
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))
}