summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2023-03-24 22:14:53 +0200
committerPaul Buetow <paul@buetow.org>2023-03-24 22:14:53 +0200
commit0c217e49542b1baeb73e4e56a868a08ea51296ac (patch)
tree01daaf2bf3047280e3183aad0fb5cee7649a7e51
parentc8e24d8da9ed313566e4c2a71c11452246e4d171 (diff)
rename interface Put to Set
-rw-r--r--search/search_test.go4
-rw-r--r--search/set.go2
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)