a circular ring buffer in Golang