From c97cb89b4a154548891173764a4310e3be5b1a2c Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 28 Oct 2021 10:39:33 -0500 Subject: DOCS: clean up variable names for node.*() functions Signed-off-by: Jeff Carr --- window.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'window.go') diff --git a/window.go b/window.go index 56081d2..7415010 100644 --- a/window.go +++ b/window.go @@ -147,18 +147,18 @@ func (parent *Node) makeNode(title string, x int, y int) *Node { return &node } -func (parent *Node) AddNode(title string) *Node { +func (n *Node) AddNode(title string) *Node { var node Node node.Name = title - node.Width = parent.Width - node.Height = parent.Height + node.Width = n.Width + node.Height = n.Height id := Config.prefix + strconv.Itoa(Config.counter) Config.counter += 1 node.id = id - parent.Append(&node) - node.parent = parent + n.Append(&node) + node.parent = n return &node } -- cgit v1.2.3