Skip to content

Instantly share code, notes, and snippets.

View unanoc's full-sized avatar
💜
the best code is the code that doesn't exist

daniel unanoc

💜
the best code is the code that doesn't exist
View GitHub Profile
@unanoc
unanoc / cycled_buffer.go
Created January 24, 2021 18:00
Cycled buffer implementation
package main
import "fmt"
// Object is an interface for cache value elements.
type Object interface{}
// CycledBuffer is a buffer for storing cache objects.
type CycledBuffer struct {
buff []Object