Unset removes a value on a given tree from the specified path
(path []interface{})
| 290 | |
| 291 | // Unset removes a value on a given tree from the specified path |
| 292 | func (branch TreeBranch) Unset(path []interface{}) (TreeBranch, error) { |
| 293 | v, err := unset(branch, path) |
| 294 | if err != nil { |
| 295 | return nil, err |
| 296 | } |
| 297 | return v.(TreeBranch), nil |
| 298 | } |
| 299 | |
| 300 | // Tree is the data structure used by sops to represent documents internally |
| 301 | type Tree struct { |