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

Dtrie.Get() panics on unexisting key #203

Open
asido opened this issue Apr 4, 2019 · 1 comment
Open

Dtrie.Get() panics on unexisting key #203

asido opened this issue Apr 4, 2019 · 1 comment

Comments

@asido
Copy link

asido commented Apr 4, 2019

// Get returns the value for the associated key or returns nil if the
// key does not exist.
func (d *Dtrie) Get(key interface{}) interface{} {
	return get(d.root, d.hasher(key), key).Value()
}

get() returns nil if the key is not found and thus Value() raises a panic. Is that by design?

@AliceBennett
Copy link
Contributor

#207

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants