Skip to content

dastergon/golang-timemap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

golang-timemap

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

Documentation

Full docs are available on Godoc

Example

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" :-)
}