From b069347851290fae52bc45b40f526c16c1808d38 Mon Sep 17 00:00:00 2001 From: abelanger5 Date: Wed, 3 Jan 2024 13:49:14 -0500 Subject: [PATCH] fix: check duplicate functions correctly (#66) --- pkg/worker/worker.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/worker/worker.go b/pkg/worker/worker.go index 68950d6d2..51b6e3cf3 100644 --- a/pkg/worker/worker.go +++ b/pkg/worker/worker.go @@ -187,7 +187,7 @@ func (w *Worker) registerAction(name string, method any) error { // if action has already been registered, ensure that the method is the same if currMethod, ok := w.actions[name]; ok { - if reflect.ValueOf(currMethod).Pointer() != reflect.ValueOf(method).Pointer() { + if reflect.ValueOf(currMethod.MethodFn()).Pointer() != reflect.ValueOf(method).Pointer() { return fmt.Errorf("action %s is already registered with function %s", name, getFnName(currMethod.MethodFn())) } }