golang / groupcache

groupcache is a caching and cache-filling library, intended as a replacement for memcached in many cases.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

many function should check parameter

knightXun opened this issue · comments

i find lru/cache.go does't check parameter.if user use negative number,it may be unusable.

if let me rewirte the code,it would be hounorable to me.

I don't think this is a common enough problem to worry about.

If users want to shoot themselves in the foot, feel free. In fact, this package isn't supposed to be public. It's an internal detail but predates Go's internal package mechanism.