Commit 40be065a authored by Jeromy's avatar Jeromy

a little more progress... and some debugging code

parent b32dcdec
...@@ -46,6 +46,14 @@ type Link struct { ...@@ -46,6 +46,14 @@ type Link struct {
// AddNodeLink adds a link to another node. // AddNodeLink adds a link to another node.
func (n *Node) AddNodeLink(name string, that *Node) error { func (n *Node) AddNodeLink(name string, that *Node) error {
// DEBUG CODE
for _, l := range n.Links {
if l.Name == name {
panic("Trying to add child that already exists!")
}
}
//
s, err := that.Size() s, err := that.Size()
if err != nil { if err != nil {
return err return err
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment