diff options
| author | Pimyn Girgis <pimyn@google.com> | 2026-02-10 16:18:38 +0100 |
|---|---|---|
| committer | Thoth <pimyn@google.com> | 2026-02-11 09:15:23 +0000 |
| commit | 75707236357ca67459cba5dc9d48a9d3e062870f (patch) | |
| tree | d911d5b275c1ed08a41d1d315e4ed603b5196239 /pkg/debugtracer/debug.go | |
| parent | 065bb22876f32a7784830f2493373c2148343a40 (diff) | |
pkg/debugtracer: rename Log to Logf
The methods are used for formatted output, so rename them to follow Go conventions.
Additionally, fix TestTracer to use formatted output (t.Logf) instead of unformatted output (t.Log).
Diffstat (limited to 'pkg/debugtracer/debug.go')
| -rw-r--r-- | pkg/debugtracer/debug.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pkg/debugtracer/debug.go b/pkg/debugtracer/debug.go index fa30c244a..809e34f1e 100644 --- a/pkg/debugtracer/debug.go +++ b/pkg/debugtracer/debug.go @@ -14,7 +14,7 @@ import ( ) type DebugTracer interface { - Log(msg string, args ...any) + Logf(msg string, args ...any) SaveFile(filename string, data []byte) } @@ -31,7 +31,7 @@ type TestTracer struct { type NullTracer struct { } -func (gt *GenericTracer) Log(msg string, args ...any) { +func (gt *GenericTracer) Logf(msg string, args ...any) { if gt.WithTime { timeStr := time.Now().Format("02-Jan-2006 15:04:05") newArgs := append([]any{timeStr}, args...) @@ -49,15 +49,15 @@ func (gt *GenericTracer) SaveFile(filename string, data []byte) { osutil.WriteFile(filepath.Join(gt.OutDir, filename), data) } -func (tt *TestTracer) Log(msg string, args ...any) { - tt.T.Log(msg, args) +func (tt *TestTracer) Logf(msg string, args ...any) { + tt.T.Logf(msg, args...) } func (tt *TestTracer) SaveFile(filename string, data []byte) { // Not implemented. } -func (nt *NullTracer) Log(msg string, args ...any) { +func (nt *NullTracer) Logf(msg string, args ...any) { // Not implemented. } |
