-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
338 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package datamodel | ||
|
||
// NodeAmender layers onto NodeBuilder the ability to transform all or part of a Node under construction. | ||
type NodeAmender interface { | ||
NodeBuilder | ||
|
||
// Transform takes in a Node (or a child Node in case of recursive nodes) and returns a NodeAmender that stores the | ||
// transformed results. It returns the pre-transformation state of the target Node. | ||
Transform(path Path, transform func(Node) (NodeAmender, error)) (Node, error) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.