errorhandler/main.go
2023-03-21 19:21:57 +01:00

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))
}