From 0c217e49542b1baeb73e4e56a868a08ea51296ac Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 24 Mar 2023 22:14:53 +0200 Subject: rename interface Put to Set --- search/search_test.go | 4 ++-- search/set.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/search/search_test.go b/search/search_test.go index 1d445bc..f671a9f 100644 --- a/search/search_test.go +++ b/search/search_test.go @@ -45,7 +45,7 @@ func TestGoMap(t *testing.T) { } } -func test(s Put, l int, t *testing.T) { +func test(s Set, l int, t *testing.T) { keys := ds.NewRandomArrayList(l, l) randoms := ds.NewRandomArrayList(l, -1) mapping := make(map[int]int, l) @@ -141,7 +141,7 @@ func BenchmarkGoMap(t *testing.B) { } } -func benchmark(s Put, l int, b *testing.B) { +func benchmark(s Set, l int, b *testing.B) { list := ds.NewRandomArrayList(l, -1) b.Run(fmt.Sprintf("random(%d)", l), func(b *testing.B) { diff --git a/search/set.go b/search/set.go index 407ca44..ed5b442 100644 --- a/search/set.go +++ b/search/set.go @@ -7,7 +7,7 @@ var ( NotImplemented = fmt.Errorf("method not implemented") ) -type Put interface { +type Set interface { Empty() bool Size() int Put(key int, val int) -- cgit v1.2.3