Skip to content

Commit b2d2e82

Browse files
committed
Fix early return
1 parent 6c24554 commit b2d2e82

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

testutil/eventually.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ func Eventually(ctx context.Context, t testing.TB, condition func(ctx context.Co
3232
if len(msgAndArgs) > 0 {
3333
if m, ok := msgAndArgs[0].(string); ok {
3434
msg = fmt.Sprintf(m, msgAndArgs[1:]...)
35-
} else {
36-
panic("developer error: first argument of msgAndArgs must be a string")
35+
return
3736
}
37+
panic("developer error: first argument of msgAndArgs must be a string")
3838
}
3939

4040
ticker := time.NewTicker(tick)

0 commit comments

Comments
 (0)