summaryrefslogtreecommitdiff
path: root/window.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2021-10-28 10:39:33 -0500
committerJeff Carr <[email protected]>2021-10-28 10:39:33 -0500
commitc97cb89b4a154548891173764a4310e3be5b1a2c (patch)
tree2002a0666850ccdf561085209a0189cd4de08fa8 /window.go
parent2b85dda8006adacc7b5b0c5594033226097e9214 (diff)
DOCS: clean up variable names for node.*() functionsv0.0.5
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'window.go')
-rw-r--r--window.go10
1 files changed, 5 insertions, 5 deletions
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
}