v0.0.206
This commit is contained in:
@@ -3,8 +3,10 @@ package ginext
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"gogs.mikescher.com/BlackForestBytes/goext/langext"
|
||||
"gogs.mikescher.com/BlackForestBytes/goext/rext"
|
||||
"net/http"
|
||||
"reflect"
|
||||
"regexp"
|
||||
"runtime"
|
||||
"strings"
|
||||
)
|
||||
@@ -137,8 +139,10 @@ func nameOfFunction(f any) string {
|
||||
fname = fname[:len(fname)-len("-fm")]
|
||||
}
|
||||
|
||||
if strings.HasSuffix(fname, ".func1") {
|
||||
fname = fname[:len(fname)-len(".func1")]
|
||||
suffix := rext.W(regexp.MustCompile("\\.func[0-9]+$"))
|
||||
|
||||
if match, ok := suffix.MatchFirst(fname); ok {
|
||||
fname = fname[:len(fname)-match.FullMatch().Length()]
|
||||
}
|
||||
|
||||
return fname
|
||||
|
Reference in New Issue
Block a user