INNER CODE UNIT · Go
deps
pcasteran/terraform-graph-beautifier · cytoscape/writer.go:59
deps := make([]*tfgraph.Dependency, len(graph.Dependencies))
copy(deps, graph.Dependencies)
// Get the graph nodes.
var nodes []*Node
var addElement func(parent *tfgraph.Module, element tfgraph.ConfigElement)
addElement = func(parent *tfgraph.Module, element tfgraph.ConfigElement) {
// Add a node for the element.
node := &Node{
Data: NodeData{
ID: element.GetQualifiedName(),
Label: element.GetName(),
Type: element.GetTfType(),
},
Classes: []string{element.GetTfType()},
}
if parent != nil {
parentName := parent.GetQualifiedName()