mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 14:00:54 +00:00
Update templatefunc.go
This commit is contained in:
parent
d4e15c0bd0
commit
d91840779a
@ -698,6 +698,8 @@ func MapGet(arg1 interface{}, arg2 ...interface{}) (interface{}, error) {
|
|||||||
|
|
||||||
storedVal := arg1Val.MapIndex(arg2Val)
|
storedVal := arg1Val.MapIndex(arg2Val)
|
||||||
|
|
||||||
|
|
||||||
|
if storedVal.IsValid() {
|
||||||
var result interface{}
|
var result interface{}
|
||||||
|
|
||||||
switch arg1Type.Elem().Kind() {
|
switch arg1Type.Elem().Kind() {
|
||||||
@ -724,4 +726,9 @@ func MapGet(arg1 interface{}, arg2 ...interface{}) (interface{}, error) {
|
|||||||
} else {
|
} else {
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user