(dir string, opts ...NodeOption)
| 17 | ) |
| 18 | |
| 19 | func NewBaseNode(dir string, opts ...NodeOption) *baseNode { |
| 20 | node := &baseNode{ |
| 21 | parent: nil, |
| 22 | dir: dir, |
| 23 | } |
| 24 | |
| 25 | // Apply options |
| 26 | for _, opt := range opts { |
| 27 | opt(node) |
| 28 | } |
| 29 | |
| 30 | return node |
| 31 | } |
| 32 | |
| 33 | func WithParent(parent Node) NodeOption { |
| 34 | return func(node *baseNode) { |
no outgoing calls
no test coverage detected
searching dependent graphs…