From b6d6a330520d80226fa002712a3a362661d3d84f Mon Sep 17 00:00:00 2001 From: Luka Giorgadze Date: Thu, 11 Sep 2025 15:44:50 +0400 Subject: [PATCH 1/2] feat: use Stringer in getFunctionName when available --- internal/internal_worker.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/internal_worker.go b/internal/internal_worker.go index 50abde3e8..02854fbd0 100644 --- a/internal/internal_worker.go +++ b/internal/internal_worker.go @@ -2069,6 +2069,9 @@ func isError(inType reflect.Type) bool { } func getFunctionName(i interface{}) (name string, isMethod bool) { + if s, ok := i.(fmt.Stringer); ok { + return s.String(), false + } if fullName, ok := i.(string); ok { return fullName, false } From f12cfd370eae065671915ff80ebd2a1221609b36 Mon Sep 17 00:00:00 2001 From: Luka Giorgadze Date: Thu, 11 Sep 2025 19:49:53 +0400 Subject: [PATCH 2/2] check fmt.Stringer after the func pointer --- internal/internal_worker.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/internal_worker.go b/internal/internal_worker.go index 02854fbd0..61af46002 100644 --- a/internal/internal_worker.go +++ b/internal/internal_worker.go @@ -2069,9 +2069,6 @@ func isError(inType reflect.Type) bool { } func getFunctionName(i interface{}) (name string, isMethod bool) { - if s, ok := i.(fmt.Stringer); ok { - return s.String(), false - } if fullName, ok := i.(string); ok { return fullName, false } @@ -2089,6 +2086,9 @@ func getFunctionName(i interface{}) (name string, isMethod bool) { // var a *Activities // ExecuteActivity(ctx, a.Foo) // will call this function which is going to return "Foo" + if s, ok := i.(fmt.Stringer); ok { + return s.String(), false + } return strings.TrimSuffix(shortName, "-fm"), isMethod }