From f910bcf09042dba8adf2553d5cc2333b1483d6c9 Mon Sep 17 00:00:00 2001 From: sontrinh16 Date: Fri, 15 Dec 2023 22:08:25 +0700 Subject: [PATCH] minor public func command change --- tree.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tree.go b/tree.go index 9d0e54f..2f1deb8 100644 --- a/tree.go +++ b/tree.go @@ -26,7 +26,7 @@ type Tree interface { // The keys of this map should be kebab cased. E.g. "default-tree" var treeFns = sync.Map{} -// Must be called in the init function +// RegisterTree must be called in the init function func RegisterTree(treeName string, treeConstructor TreeConstructorFn) error { if _, ok := treeFns.Load(treeName); ok { return fmt.Errorf("%s already registered", treeName) @@ -37,7 +37,7 @@ func RegisterTree(treeName string, treeConstructor TreeConstructorFn) error { return nil } -// Get tree constructor function by tree name from the global map registry +// TreeFn get tree constructor function by tree name from the global map registry func TreeFn(treeName string) (TreeConstructorFn, error) { var treeFn TreeConstructorFn v, ok := treeFns.Load(treeName)