mirror of https://github.com/knative/client.git
* feature(serving): Update API to serving.knative.dev/v1 Due to an issue with 0.12.0 (a missing constant) the update also includes an update to the latest knative-serving and knative-eventing dependencies from master (as reflected in version.go) Signed-off-by: Roland Huß <roland@ro14nd.de> * fix(serving): Bogus import removed * fix(serving): Add missing go.sum entry |
||
|---|---|---|
| .. | ||
| simplelru | ||
| .gitignore | ||
| 2q.go | ||
| LICENSE | ||
| README.md | ||
| arc.go | ||
| doc.go | ||
| go.mod | ||
| lru.go | ||
README.md
golang-lru
This provides the lru package which implements a fixed-size
thread safe LRU cache. It is based on the cache in Groupcache.
Documentation
Full docs are available on Godoc
Example
Using the LRU is very simple:
l, _ := New(128)
for i := 0; i < 256; i++ {
l.Add(i, nil)
}
if l.Len() != 128 {
panic(fmt.Sprintf("bad len: %v", l.Len()))
}