Skip to content

Commit

Permalink
兼容泛型mapper
Browse files Browse the repository at this point in the history
  • Loading branch information
ai-awen committed Jul 26, 2023
1 parent 8e2ab1a commit abf7feb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gobatis.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,9 @@ func Element(element *etree.Element, template string, ctx map[string]any) (strin

func Namespace(namespace string) string {
if index := strings.LastIndex(namespace, "."); index != -1 {
if end := strings.Index(namespace, "["); end != -1 {
return namespace[index+1 : end]
}
return namespace[index+1:]
}
return namespace
Expand Down

0 comments on commit abf7feb

Please sign in to comment.