An open API service indexing awesome lists of open source software.

https://github.com/dastergon/golang-timemap

Time-based key-value store for Go
https://github.com/dastergon/golang-timemap

go golang golang-datastructure golang-library golang-package map

Last synced: 8 months ago
JSON representation

Time-based key-value store for Go

Awesome Lists containing this project

README

          

# golang-timemap
A thread-safe time-based key-value store for Go.

## Documentation
Full docs are available on [Godoc](http://godoc.org/github.com/dastergon/golang-timemap)

## Example
```go
func main() {
l := timemap.New()
l.Set("name", "Rustacean", time.Now())
time.Sleep(10 * time.Millisecond)
l.Set("name", "Gopher", time.Now())
v, _ := l.Get("name", time.Now())
fmt.Println(v) # Expect "Gopher" :-)
}
```