snapshot of https://github.com/ThreeDotsLabs/watermill.git (master, 2026-09-15; blobs > 131072B omitted)
Some checks failed
master / ci (push) Failing after 0s

This commit is contained in:
upstream-mirror
2026-09-15 21:27:46 +05:00
commit ce933d1277
538 changed files with 46504 additions and 0 deletions

17
internal/name.go Normal file
View File

@@ -0,0 +1,17 @@
package internal
import (
"fmt"
"strings"
)
// StructName returns a normalized name of the passed structure.
func StructName(v interface{}) string {
if s, ok := v.(fmt.Stringer); ok {
return s.String()
}
s := fmt.Sprintf("%T", v)
// trim the pointer marker, if any
return strings.TrimLeft(s, "*")
}