go.charczuk.com@v0.0.0-20240327042549-bc490516bd1a/projects/nodes/pkg/model/gen/table.go (about) 1 // File generated by nodegen. DO NOT EDIT. 2 package gen 3 4 import ( 5 "fmt" 6 7 "github.com/wcharczuk/go-incr" 8 "go.charczuk.com/projects/nodes/pkg/incrutil" 9 "go.charczuk.com/projects/nodes/pkg/types" 10 ) 11 12 func TableForNode(graph *incr.Graph, n *types.Node) (output incr.INode, err error) { 13 switch n.Metadata.OutputType { 14 15 case "table": 16 output = incrutil.Var(graph, new(types.Table)) 17 return 18 default: 19 err = fmt.Errorf("invalid table output type %v", n.Metadata.OutputType) 20 return 21 } 22 }