Correct message for step value check

Kubernetes-commit: 6a819f75364db04638aabd97ae7a19b0b1e97b22
This commit is contained in:
Ted Yu 2019-01-22 09:41:13 -08:00 committed by Kubernetes Publisher
parent c386de2aa6
commit 29e468d1ac

View File

@ -278,7 +278,7 @@ func (j *JSONPath) evalArray(input []reflect.Value, node *ArrayNode) ([]reflect.
step := 1
if params[2].Known {
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
}