go-datastructures
go-datastructures copied to clipboard
Dtrie.Get() panics on unexisting key
// 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?
https://github.com/Workiva/go-datastructures/pull/207