mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 08:30: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)
|
||||
|
||||
|
||||
if storedVal.IsValid() {
|
||||
var result interface{}
|
||||
|
||||
switch arg1Type.Elem().Kind() {
|
||||
@ -724,4 +726,9 @@ func MapGet(arg1 interface{}, arg2 ...interface{}) (interface{}, error) {
|
||||
} else {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user