fix golint issues
This commit is contained in:
@@ -16,7 +16,7 @@ func TestRelativeTime(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestRelativeTime_Time(t *testing.T) {
|
||||
diff := Time().Sub(time.Now())
|
||||
diff := time.Until(Time())
|
||||
if diff > 0 {
|
||||
assert.True(t, diff < time.Second)
|
||||
} else {
|
||||
|
||||
@@ -27,12 +27,9 @@ func TestFakeTicker(t *testing.T) {
|
||||
|
||||
var count int32
|
||||
go func() {
|
||||
for {
|
||||
select {
|
||||
case <-ticker.Chan():
|
||||
if atomic.AddInt32(&count, 1) == total {
|
||||
ticker.Done()
|
||||
}
|
||||
for range ticker.Chan() {
|
||||
if atomic.AddInt32(&count, 1) == total {
|
||||
ticker.Done()
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
Reference in New Issue
Block a user