Commit 933daef3 authored by Mike Danese's avatar Mike Danese

fix cache.Get error handling on bad key

parent a5a91760
......@@ -176,7 +176,7 @@ func (c *cache) ByIndex(indexName, indexKey string) ([]interface{}, error) {
// Get returns the requested item, or sets exists=false.
// Get is completely threadsafe as long as you treat all items as immutable.
func (c *cache) Get(obj interface{}) (item interface{}, exists bool, err error) {
key, _ := c.keyFunc(obj)
key, err := c.keyFunc(obj)
if err != nil {
return nil, false, KeyError{obj, err}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment