From b274b225bf92f086d8e59d023ed436e97ed14062 Mon Sep 17 00:00:00 2001 From: onee-only Date: Sun, 10 Mar 2024 15:52:13 +0900 Subject: plumbing: object, Apply memoization in (*treeNoder).Children. --- plumbing/object/treenoder.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'plumbing/object/treenoder.go') diff --git a/plumbing/object/treenoder.go b/plumbing/object/treenoder.go index 6e7b334..2adb645 100644 --- a/plumbing/object/treenoder.go +++ b/plumbing/object/treenoder.go @@ -88,7 +88,9 @@ func (t *treeNoder) Children() ([]noder.Noder, error) { } } - return transformChildren(parent) + var err error + t.children, err = transformChildren(parent) + return t.children, err } // Returns the children of a tree as treenoders. -- cgit