Skip to content

Commit

Permalink
testr: remove Logf from TestingT since it's not strictly required
Browse files Browse the repository at this point in the history
  • Loading branch information
jeandeaual committed Jun 2, 2022
1 parent 4683f8b commit 5ab368c
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions testr/testr.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import (
type TestingT interface {
Helper()
Log(args ...interface{})
Logf(format string, args ...interface{})
}

// New returns a logr.Logger that prints through a testing.T object.
Expand Down Expand Up @@ -116,10 +115,9 @@ func logInfo(
prefix, args := formatInfo(level, msg, kvList)
t.Helper()
if prefix != "" {
t.Logf("%s: %s", prefix, args)
} else {
t.Log(args)
args = prefix + ": " + args
}
t.Log(args)
}

func logError(
Expand All @@ -132,10 +130,9 @@ func logError(
prefix, args := formatError(err, msg, kvList)
t.Helper()
if prefix != "" {
t.Logf("%s: %s", prefix, args)
} else {
t.Log(args)
args = prefix + ": " + args
}
t.Log(args)
}

type testlogger struct {
Expand Down

0 comments on commit 5ab368c

Please sign in to comment.