feat: make it works

上级 141a9c20
package tequila
import (
"fmt"
"github.com/awalterschulze/gographviz"
"sort"
"strconv"
......@@ -203,12 +202,10 @@ func (fullGraph *FullGraph) buildGraphNode(subgraph string, current *GraphNode,
if len(current.children) > 0 {
for _, child := range current.children {
fmt.Println(current.text)
fullGraph.buildGraphNode(layerName, child, graph, nodes)
}
} else {
fmt.Println(layerName, current.text, fullGraph.nodeIndex)
_ = graph.AddNode(layerName, "node"+strconv.Itoa(fullGraph.nodeIndex), fullGraph.buildRelationAttr(current.text))
_ = graph.AddNode(subgraph, "node"+strconv.Itoa(fullGraph.nodeIndex), fullGraph.buildRelationAttr(current.text))
nodes[current.text] = "node" + strconv.Itoa(fullGraph.nodeIndex)
fullGraph.nodeIndex++
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册