1
0
mirror of https://github.com/taigrr/yq synced 2025-01-18 04:53:17 -08:00

Show paths

This commit is contained in:
Mike Farah
2019-12-23 09:08:00 +11:00
parent 3d3eaf3034
commit 5204a13685
2 changed files with 52 additions and 11 deletions

View File

@@ -241,7 +241,7 @@ func (n *navigator) recurseMap(value *yaml.Node, head string, tail []string, vis
return nil
}
//didn't find it, lets add it.
//TODO: have option to NOT do this... didn't find it, lets add it.
mapEntryKey := yaml.Node{Value: head, Kind: yaml.ScalarNode}
value.Content = append(value.Content, &mapEntryKey)
mapEntryValue := yaml.Node{Kind: n.GuessKind(tail, 0)}