mirror of
https://github.com/astaxie/beego.git
synced 2025-07-06 05:50:19 +00:00
ignore case of tag and fixed bug for columName
This commit is contained in:
@ -192,10 +192,10 @@ func parseStructTag(data string, attrs *map[string]bool, tags *map[string]string
|
||||
tag := make(map[string]string)
|
||||
for _, v := range strings.Split(data, defaultStructTagDelim) {
|
||||
v = strings.TrimSpace(v)
|
||||
if supportTag[v] == 1 {
|
||||
attr[v] = true
|
||||
if t := strings.ToLower(v); supportTag[t] == 1 {
|
||||
attr[t] = true
|
||||
} else if i := strings.Index(v, "("); i > 0 && strings.Index(v, ")") == len(v)-1 {
|
||||
name := v[:i]
|
||||
name := t[:i]
|
||||
if supportTag[name] == 2 {
|
||||
v = v[i+1 : len(v)-1]
|
||||
tag[name] = v
|
||||
|
Reference in New Issue
Block a user