Allow appending to KVV values (kvv.field[] = val)

This commit is contained in:
Denis Arh
2021-08-16 21:46:58 +02:00
parent 0b7e9b108b
commit 14b3f07941
4 changed files with 59 additions and 7 deletions
+3 -1
View File
@@ -1,8 +1,9 @@
package expr
import (
"github.com/stretchr/testify/require"
"testing"
"github.com/stretchr/testify/require"
)
func TestPathSplit(t *testing.T) {
@@ -16,6 +17,7 @@ func TestPathSplit(t *testing.T) {
{p: "a.b[1]", r: []string{"a", "b", "1"}},
{p: "a.b[1].baz[0]", r: []string{"a", "b", "1", "baz", "0"}},
{p: "a.[]", err: invalidPathErr.Error()},
{p: "a[]", r: []string{"a", ""}},
{p: "a[1]bzz", err: invalidPathErr.Error()},
}