a ring buffer implemented in go