Merge pull request #15 from moorereason/fix-negindex

Only support unsigned ints for slice indexes
This commit is contained in:
Adnan Hajdarević 2015-03-20 23:31:42 +01:00
commit b8807ed434

View file

@ -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