From ab07405cda2761881a484c934736c919f46c2e42 Mon Sep 17 00:00:00 2001 From: Celestino Amoroso Date: Mon, 13 May 2024 14:23:21 +0200 Subject: [PATCH] common-errors.go: added errDivisionByZero() --- common-errors.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common-errors.go b/common-errors.go index 7e7f194..1909a3b 100644 --- a/common-errors.go +++ b/common-errors.go @@ -18,6 +18,10 @@ func errExpectedGot(funcName string, kind string, value any) error { return fmt.Errorf("%s() expected %s, got %T (%v)", funcName, kind, value, value) } +func errDivisionByZero(funcName string) error { + return fmt.Errorf("%s() division by zero", funcName) +} + // --- Parameter errors func errOneParam(funcName string) error {