Skip to content

Commit

Permalink
Fix Errorf formatting
Browse files Browse the repository at this point in the history
Fix siddontang#9.

Signed-off-by: Robert-André Mauchin <[email protected]>
  • Loading branch information
eclipseo committed Jan 10, 2021
1 parent bdc7756 commit 3ebea78
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion filelock/file_lock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func TestLock(t *testing.T) {
// Avoid truncating an existing, non-empty file.
fi, err := os.Stat(filename)
if err == nil && fi.Size() != 0 {
t.Fatal("The file %s is not empty", filename)
t.Fatalf("The file %s is not empty", filename)
}

t.Logf("Locking %s\n", filename)
Expand Down
4 changes: 2 additions & 2 deletions list2/list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func checkListPointers(t *testing.T, l *List, es []*Element) {
Prev = prev
}
if p := e.prev; p != prev.index {
t.Errorf("elt[%d](%p).prev = %p, want %p", i, e, p, prev)
t.Errorf("elt[%d](%p).prev = %d, want %p", i, e, p, prev)
}
if p := e.Prev(); p != Prev {
t.Errorf("elt[%d](%p).Prev() = %p, want %p", i, e, p, Prev)
Expand All @@ -70,7 +70,7 @@ func checkListPointers(t *testing.T, l *List, es []*Element) {
Next = next
}
if n := e.next; n != next.index {
t.Errorf("elt[%d](%p).next = %p, want %p", i, e, n, next)
t.Errorf("elt[%d](%p).next = %d, want %p", i, e, n, next)
}
if n := e.Next(); n != Next {
t.Errorf("elt[%d](%p).Next() = %p, want %p", i, e, n, Next)
Expand Down

0 comments on commit 3ebea78

Please sign in to comment.