Skip to content

Commit a178955

Browse files
committed
Export GetDotAttributes() method
1 parent 04838ad commit a178955

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

binarytree.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -413,9 +413,9 @@ func (n *Node[T]) AddAttribute(name, value string) {
413413
n.dotAttributes[name] = value
414414
}
415415

416-
// getDotAttributes returns the attributes associated with the node in
416+
// GetDotAttributes returns the attributes associated with the node in
417417
// format suitable for using in the Dot representation.
418-
func (n *Node[T]) getDotAttributes() string {
418+
func (n *Node[T]) GetDotAttributes() string {
419419
attrs := ""
420420
for k, v := range n.dotAttributes {
421421
attrs += fmt.Sprintf("%s=%s ", k, v)
@@ -449,7 +449,7 @@ func (n *Node[T]) WriteDot(w io.Writer) error {
449449

450450
walkFunc := func(n *Node[T]) error {
451451
nodeId := n.dotId()
452-
_, err := fmt.Fprintf(w, "\t%d [label=\"<l>|<v> %v|<r>\" %s]\n", nodeId, n.Value, n.getDotAttributes())
452+
_, err := fmt.Fprintf(w, "\t%d [label=\"<l>|<v> %v|<r>\" %s]\n", nodeId, n.Value, n.GetDotAttributes())
453453
if err != nil {
454454
return err
455455
}

0 commit comments

Comments
 (0)