chore: style fixes from go fix (#10846)
Just `go fix ./...` Signed-off-by: Jakob Borg <jakob@kastelo.net>
This commit is contained in:
@@ -127,7 +127,7 @@ func TestBufferOverflow(t *testing.T) {
|
||||
|
||||
t0 := time.Now()
|
||||
const nEvents = BufferSize * 2
|
||||
for i := 0; i < nEvents; i++ {
|
||||
for range nEvents {
|
||||
l.Log(DeviceConnected, "foo")
|
||||
}
|
||||
if d := time.Since(t0); d > 15*time.Second {
|
||||
@@ -237,7 +237,7 @@ func TestBufferedSub(t *testing.T) {
|
||||
bs := NewBufferedSubscription(s, 10*BufferSize)
|
||||
|
||||
go func() {
|
||||
for i := 0; i < 10*BufferSize; i++ {
|
||||
for i := range 10 * BufferSize {
|
||||
l.Log(DeviceConnected, fmt.Sprintf("event-%d", i))
|
||||
if i%30 == 0 {
|
||||
// Give the buffer routine time to pick up the events
|
||||
@@ -378,7 +378,7 @@ func TestUnsubscribeContention(t *testing.T) {
|
||||
|
||||
stopListeners := make(chan struct{})
|
||||
var listenerWg sync.WaitGroup
|
||||
for i := 0; i < listeners; i++ {
|
||||
for range listeners {
|
||||
listenerWg.Go(func() {
|
||||
s := l.Subscribe(AllEvents)
|
||||
defer s.Unsubscribe()
|
||||
@@ -400,7 +400,7 @@ func TestUnsubscribeContention(t *testing.T) {
|
||||
stopSenders := make(chan struct{})
|
||||
defer close(stopSenders)
|
||||
var senderWg sync.WaitGroup
|
||||
for i := 0; i < senders; i++ {
|
||||
for range senders {
|
||||
senderWg.Go(func() {
|
||||
t := time.NewTicker(time.Millisecond)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user