Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert %w verb in t.Errorf function to %v #431

Merged
merged 1 commit into from
Jan 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions mountstats_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ func TestMountStats(t *testing.T) {
t.Error("expected an error, but none occurred")
}
if !tt.invalid && err != nil {
t.Errorf("unexpected error: %w", err)
t.Errorf("unexpected error: %v", err)
}

if want, have := tt.mounts, mounts; !reflect.DeepEqual(want, have) {
Expand Down Expand Up @@ -434,7 +434,7 @@ func TestMountStatsExtendedOperationStats(t *testing.T) {
r := strings.NewReader(extendedOpsExampleMountstats)
_, err := parseMountStats(r)
if err != nil {
t.Errorf("failed to parse mount stats with extended per-op statistics: %w", err)
t.Errorf("failed to parse mount stats with extended per-op statistics: %v", err)
}
}

Expand Down
2 changes: 1 addition & 1 deletion swaps_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func TestParseSwapString(t *testing.T) {
t.Error("unexpected success")
}
if !tt.invalid && err != nil {
t.Errorf("unexpected error: %w", err)
t.Errorf("unexpected error: %v", err)
}

if !reflect.DeepEqual(tt.swap, swap) {
Expand Down