THRIFT-3467 Go Maps for Thrift Sets Should Have Values of Type struct{}
Client: Go
Patch: artem antonenko <sam901@yandex.ru>
This closes #976
diff --git a/test/go/src/bin/stress/main.go b/test/go/src/bin/stress/main.go
index 4fc88e0..1f713bb 100644
--- a/test/go/src/bin/stress/main.go
+++ b/test/go/src/bin/stress/main.go
@@ -201,14 +201,13 @@
atomic.AddInt64(&clicounter, 1)
}
case echoSet:
- s := map[int8]bool{-10: true, -9: true, -8: true, -7: true, -6: true, -5: true, -4: true, -3: true, -2: true, -1: true, 0: true, 1: true, 2: true, 3: true, 4: true, 5: true, 6: true, 7: true, 8: true}
+ s := map[int8]struct{}{-10: {}, -9: {}, -8: {}, -7: {}, -6: {}, -5: {}, -4: {}, -3: {}, -2: {}, -1: {}, 0: {}, 1: {}, 2: {}, 3: {}, 4: {}, 5: {}, 6: {}, 7: {}, 8: {}}
for i := 0; i < *loop; i++ {
client.EchoSet(s)
atomic.AddInt64(&clicounter, 1)
}
case echoMap:
- m := map[int8]int8{
- -10: 10, -9: 9, -8: 8, -7: 7, -6: 6, -5: 5, -4: 4, -3: 3, -2: 2, -1: 1, 0: 0, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8}
+ m := map[int8]int8{-10: 10, -9: 9, -8: 8, -7: 7, -6: 6, -5: 5, -4: 4, -3: 3, -2: 2, -1: 1, 0: 0, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8}
for i := 0; i < *loop; i++ {
client.EchoMap(m)
atomic.AddInt64(&clicounter, 1)
@@ -244,7 +243,7 @@
atomic.AddInt64(&counter, 1)
return arg, nil
}
-func (h *handler) EchoSet(arg map[int8]bool) (r map[int8]bool, err error) {
+func (h *handler) EchoSet(arg map[int8]struct{}) (r map[int8]struct{}, err error) {
atomic.AddInt64(&counter, 1)
return arg, nil
}