From 46d294206cf46b6ba9d2f7750178b8809744338f Mon Sep 17 00:00:00 2001 From: Chris Banks Date: Sun, 20 Aug 2023 16:57:59 +0100 Subject: [PATCH] Fix bad syntax in examples. --- trie/trie.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trie/trie.go b/trie/trie.go index 10fdc9b0..11eda389 100644 --- a/trie/trie.go +++ b/trie/trie.go @@ -23,7 +23,7 @@ func NewTrie() *Trie { // and returns the object if the path exists in the Trie, or nil and a status of // false. Example: // -// if res, ok := trie.Get([]string{"foo", "bar"}), ok { +// if res, ok := trie.Get([]string{"foo", "bar"}); ok { // fmt.Println("Value at /foo/bar was", res) // } func (t *Trie) Get(path []string) (entry interface{}, ok bool) { @@ -50,7 +50,7 @@ func (t *Trie) Get(path []string) (entry interface{}, ok bool) { // longest matching prefix is returned. If nothing matches at all, nil and a // status of false is returned. Example: // -// if res, ok := trie.GetLongestPrefix([]string{"foo", "bar"}), ok { +// if res, ok := trie.GetLongestPrefix([]string{"foo", "bar"}); ok { // fmt.Println("Value at /foo/bar was", res) // } func (t *Trie) GetLongestPrefix(path []string) (entry interface{}, ok bool) {