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
+2 -1
View File
@@ -20,7 +20,8 @@ func PathSplit(path string) ([]string, error) {
s.Split(pathSplitter)
for s.Scan() {
if len(s.Text()) == 0 {
// checks if two consecutive path parts are empty
if len(s.Text()) == 0 && len(out) > 0 && len(out[len(out)-1]) == 0 {
return nil, invalidPathErr
}
out = append(out, s.Text())