Correct message for step value check

This commit is contained in:
Ted Yu
2019-01-22 09:41:13 -08:00
committed by Ted Yu
parent 2300d7d923
commit 6a819f7536

View File

@@ -278,7 +278,7 @@ func (j *JSONPath) evalArray(input []reflect.Value, node *ArrayNode) ([]reflect.
step := 1 step := 1
if params[2].Known { if params[2].Known {
if params[2].Value <= 0 { if params[2].Value <= 0 {
return input, fmt.Errorf("step must be >= 0") return input, fmt.Errorf("step must be > 0")
} }
step = params[2].Value step = params[2].Value
} }