mirror of
https://github.com/adnanh/webhook.git
synced 2025-05-22 21:32:32 +00:00
removed leftover debug trace, fixed a panic bug
This commit is contained in:
parent
baec1cadc5
commit
231426da57
2 changed files with 6 additions and 4 deletions
|
@ -105,8 +105,12 @@ func GetParameter(s string, params interface{}) (interface{}, bool) {
|
|||
}
|
||||
|
||||
if p := strings.SplitN(s, ".", 2); len(p) > 1 {
|
||||
if pValue, ok := params.(map[string]interface{})[p[0]]; ok {
|
||||
return GetParameter(p[1], pValue)
|
||||
if paramsValue := reflect.ValueOf(params); paramsValue.Kind() == reflect.Map {
|
||||
if pValue, ok := params.(map[string]interface{})[p[0]]; ok {
|
||||
return GetParameter(p[1], pValue)
|
||||
}
|
||||
} else {
|
||||
return nil, false
|
||||
}
|
||||
} else {
|
||||
if pValue, ok := params.(map[string]interface{})[p[0]]; ok {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue