graph/encoding/dot: fix NewNode use in tests and decoding

This commit is contained in:
kortschak
2017-07-21 13:29:49 +09:30
committed by Dan Kortschak
parent b3ce51cd98
commit 185d1d1b99
2 changed files with 4 additions and 7 deletions

View File

@@ -103,6 +103,7 @@ func (gen *generator) node(dst Builder, id string) graph.Node {
return n
}
n := dst.NewNode()
dst.AddNode(n)
if n, ok := n.(UnmarshalerID); ok {
n.UnmarshalDOTID(id)
}