Skip to content

Commit

Permalink
Fix bad syntax in examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
sengi committed Aug 20, 2023
1 parent 832ef3e commit 46d2942
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions trie/trie.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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) {
Expand Down

0 comments on commit 46d2942

Please sign in to comment.