Fix comment on SplitIndexNameValue

It was incorrect and suggested some behaviour which isn't present.
Added test to verify the documented behaviour.
This commit is contained in:
Justin SB
2020-09-11 11:39:49 -04:00
parent 6df0a45368
commit 341bacb9a2
2 changed files with 6 additions and 1 deletions

View File

@@ -518,6 +518,11 @@ func TestSplitIndexNameValue(t *testing.T) {
assert.NoError(t, err)
assert.Equal(t, "a", k)
assert.Equal(t, "b=c", v)
k, v, err = SplitIndexNameValue("=-jar")
assert.NoError(t, err)
assert.Equal(t, "", k)
assert.Equal(t, "-jar", v)
}
type filter struct {