Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/floatdrop/fifo
https://github.com/floatdrop/fifo
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/floatdrop/fifo
- Owner: floatdrop
- License: mit
- Created: 2022-03-28T08:35:48.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-03-30T08:27:08.000Z (almost 3 years ago)
- Last Synced: 2024-10-26T21:13:17.132Z (3 months ago)
- Language: Go
- Size: 8.79 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# fifo
[![Go Reference](https://pkg.go.dev/badge/github.com/floatdrop/fifo.svg)](https://pkg.go.dev/github.com/floatdrop/fifo)
[![CI](https://github.com/floatdrop/fifo/actions/workflows/ci.yml/badge.svg)](https://github.com/floatdrop/fifo/actions/workflows/ci.yml)
![Coverage](https://img.shields.io/badge/Coverage-100.0%25-brightgreen)
[![Go Report Card](https://goreportcard.com/badge/github.com/floatdrop/fifo)](https://goreportcard.com/report/github.com/floatdrop/fifo)Thread safe GoLang fixed size FIFO with O(1) `Get`.
## Example
```go
import (
"fmt""github.com/floatdrop/fifo"
)func main() {
cache := fifo.New[string, int](256)cache.Push("Hello", 5)
if e := cache.Get("Hello"); e != nil {
fmt.Println(*e)
// Output: 5
}
}
```