mirror of
https://github.com/adnanh/webhook.git
synced 2025-05-13 09:04:44 +00:00
Merge pull request #15 from moorereason/fix-negindex
Only support unsigned ints for slice indexes
This commit is contained in:
commit
b8807ed434
1 changed files with 1 additions and 1 deletions
|
@ -44,7 +44,7 @@ func ExtractParameter(s string, params interface{}) (string, bool) {
|
|||
if paramsValueSliceLength := paramsValue.Len(); paramsValueSliceLength > 0 {
|
||||
|
||||
if p := strings.SplitN(s, ".", 2); len(p) > 1 {
|
||||
index, err := strconv.ParseInt(p[0], 10, 64)
|
||||
index, err := strconv.ParseUint(p[0], 10, 64)
|
||||
|
||||
if err != nil {
|
||||
return "", false
|
||||
|
|
Loading…
Add table
Reference in a new issue