in graph/graph.go [62:70]
func (g *Graph[NT]) AddNode(n NT) error {
nodeKey := n.GetName()
if _, ok := g.nodes[nodeKey]; ok {
return NewGraphError(ErrDuplicateNode, fmt.Sprintf("node with key %s already exists in this graph", nodeKey))
}
g.nodes[nodeKey] = n
return nil
}