Skip to content
Snippets Groups Projects
Commit 7e62ff2b authored by Benjamin Wenger's avatar Benjamin Wenger
Browse files

renamed the creator function

parent 5db55469
No related branches found
No related tags found
No related merge requests found
......@@ -33,7 +33,7 @@ type Buff struct {
}
// Initialize a new ring buffer with length n
func NewRingBuff(n int, id idFunc) *Buff {
func NewBuff(n int, id idFunc) *Buff {
rb := &Buff{
buff: make([]interface{}, n),
count: n,
......
......@@ -17,7 +17,7 @@ func id(val interface{}) int {
// Setup func for tests
func setup() *Buff {
rb := NewRingBuff(5, id)
rb := NewBuff(5, id)
for i := 1; i <= 5; i++ {
rb.Push(&Tester{
Id: i,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment