Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo: "exhaution" to "exhaustion" in radix.go comments #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions radix.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func (t *Tree) Insert(s string, v interface{}) (interface{}, bool) {
n := t.root
search := s
for {
// Handle key exhaution
// Handle key exhaustion
if len(search) == 0 {
if n.isLeaf() {
old := n.leaf.val
Expand Down Expand Up @@ -246,7 +246,7 @@ func (t *Tree) Delete(s string) (interface{}, bool) {
n := t.root
search := s
for {
// Check for key exhaution
// Check for key exhaustion
if len(search) == 0 {
if !n.isLeaf() {
break
Expand Down Expand Up @@ -356,7 +356,7 @@ func (t *Tree) Get(s string) (interface{}, bool) {
n := t.root
search := s
for {
// Check for key exhaution
// Check for key exhaustion
if len(search) == 0 {
if n.isLeaf() {
return n.leaf.val, true
Expand Down Expand Up @@ -392,7 +392,7 @@ func (t *Tree) LongestPrefix(s string) (string, interface{}, bool) {
last = n.leaf
}

// Check for key exhaution
// Check for key exhaustion
if len(search) == 0 {
break
}
Expand Down Expand Up @@ -496,7 +496,7 @@ func (t *Tree) WalkPath(path string, fn WalkFn) {
return
}

// Check for key exhaution
// Check for key exhaustion
if len(search) == 0 {
return
}
Expand Down