pgraph, yamlgraph: Allow specifying notify value from YAML

This commit is contained in:
James Shubin
2017-02-06 16:29:02 -05:00
parent 5bdd2ca02f
commit ed268ad683
2 changed files with 14 additions and 5 deletions

View File

@@ -50,7 +50,11 @@ func (g *Graph) Graphviz() (out string) {
for j := range g.Adjacency[i] {
k := g.Adjacency[i][j]
// use str for clearer output ordering
str += fmt.Sprintf("\t%s -> %s [label=%s];\n", i.GetName(), j.GetName(), k.Name)
if k.Notify {
str += fmt.Sprintf("\t%s -> %s [label=%s,style=bold];\n", i.GetName(), j.GetName(), k.Name)
} else {
str += fmt.Sprintf("\t%s -> %s [label=%s];\n", i.GetName(), j.GetName(), k.Name)
}
}
}
out += str