Skip to content

Commit

Permalink
lint: fixup error warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
shoenig committed Nov 5, 2023
1 parent e4f798b commit f6f12a0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions wait/wait.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ func errFuncInitial(f func() error) runnable {
// check iterations
if r.attempts > r.c.iterations {
return &result{
Err: fmt.Errorf("%v: %w", ErrAttemptsExceeded, err),
Err: fmt.Errorf("%w: %w", ErrAttemptsExceeded, err),

Check failure on line 298 in wait/wait.go

View workflow job for this annotation

GitHub Actions / run-tests (ubuntu-22.04)

fmt.Errorf call has more than one error-wrapping directive %w

Check failure on line 298 in wait/wait.go

View workflow job for this annotation

GitHub Actions / run-tests (macos-12)

fmt.Errorf call has more than one error-wrapping directive %w

Check failure on line 298 in wait/wait.go

View workflow job for this annotation

GitHub Actions / run-tests (windows-2022)

fmt.Errorf call has more than one error-wrapping directive %w
}
}

Expand All @@ -306,7 +306,7 @@ func errFuncInitial(f func() error) runnable {
select {
case <-ctx.Done():
return &result{
Err: fmt.Errorf("%v: %w", ErrTimeoutExceeded, err),
Err: fmt.Errorf("%w: %w", ErrTimeoutExceeded, err),

Check failure on line 309 in wait/wait.go

View workflow job for this annotation

GitHub Actions / run-tests (ubuntu-22.04)

fmt.Errorf call has more than one error-wrapping directive %w

Check failure on line 309 in wait/wait.go

View workflow job for this annotation

GitHub Actions / run-tests (macos-12)

fmt.Errorf call has more than one error-wrapping directive %w

Check failure on line 309 in wait/wait.go

View workflow job for this annotation

GitHub Actions / run-tests (windows-2022)

fmt.Errorf call has more than one error-wrapping directive %w
}
case <-timer.C:
// continue
Expand Down Expand Up @@ -341,7 +341,7 @@ func testFuncContinual(f func() (bool, error)) runnable {
// make an attempt
ok, err := f()
if !ok {
return &result{Err: fmt.Errorf("%v: %w", ErrConditionUnsatisfied, err)}
return &result{Err: fmt.Errorf("%w: %w", ErrConditionUnsatisfied, err)}

Check failure on line 344 in wait/wait.go

View workflow job for this annotation

GitHub Actions / run-tests (ubuntu-22.04)

fmt.Errorf call has more than one error-wrapping directive %w

Check failure on line 344 in wait/wait.go

View workflow job for this annotation

GitHub Actions / run-tests (macos-12)

fmt.Errorf call has more than one error-wrapping directive %w

Check failure on line 344 in wait/wait.go

View workflow job for this annotation

GitHub Actions / run-tests (windows-2022)

fmt.Errorf call has more than one error-wrapping directive %w
}

// used another attempt
Expand Down Expand Up @@ -393,7 +393,7 @@ func testFuncInitial(f func() (bool, error)) runnable {
// check iterations
if r.attempts > r.c.iterations {
return &result{
Err: fmt.Errorf("%v: %w", ErrAttemptsExceeded, err),
Err: fmt.Errorf("%w: %w", ErrAttemptsExceeded, err),

Check failure on line 396 in wait/wait.go

View workflow job for this annotation

GitHub Actions / run-tests (ubuntu-22.04)

fmt.Errorf call has more than one error-wrapping directive %w

Check failure on line 396 in wait/wait.go

View workflow job for this annotation

GitHub Actions / run-tests (macos-12)

fmt.Errorf call has more than one error-wrapping directive %w

Check failure on line 396 in wait/wait.go

View workflow job for this annotation

GitHub Actions / run-tests (windows-2022)

fmt.Errorf call has more than one error-wrapping directive %w
}
}

Expand All @@ -404,7 +404,7 @@ func testFuncInitial(f func() (bool, error)) runnable {
select {
case <-ctx.Done():
return &result{
Err: fmt.Errorf("%v: %w", ErrTimeoutExceeded, err),
Err: fmt.Errorf("%w: %w", ErrTimeoutExceeded, err),

Check failure on line 407 in wait/wait.go

View workflow job for this annotation

GitHub Actions / run-tests (ubuntu-22.04)

fmt.Errorf call has more than one error-wrapping directive %w

Check failure on line 407 in wait/wait.go

View workflow job for this annotation

GitHub Actions / run-tests (macos-12)

fmt.Errorf call has more than one error-wrapping directive %w

Check failure on line 407 in wait/wait.go

View workflow job for this annotation

GitHub Actions / run-tests (windows-2022)

fmt.Errorf call has more than one error-wrapping directive %w
}
case <-timer.C:
// continue
Expand Down

0 comments on commit f6f12a0

Please sign in to comment.