Return value is replacement node
(parts []string, v string, rev int64, keep bool)
| 98 | |
| 99 | // Return value is replacement node |
| 100 | func (n node) set(parts []string, v string, rev int64, keep bool) (node, bool) { |
| 101 | if len(parts) == 0 { |
| 102 | return node{v, rev, n.Ds}, keep |
| 103 | } |
| 104 | |
| 105 | n.Ds = copyMap(n.Ds) |
| 106 | p, ok := n.Ds[parts[0]].set(parts[1:], v, rev, keep) |
| 107 | n.Ds[parts[0]] = p, ok |
| 108 | n.Rev = Dir |
| 109 | return n, len(n.Ds) > 0 |
| 110 | } |
| 111 | |
| 112 | func (n node) setp(k, v string, rev int64, keep bool) node { |
| 113 | if err := checkPath(k); err != nil { |