log: lint nits

This commit is contained in:
Martin Holst Swende 2023-11-29 20:07:41 +01:00
parent b7933d28e7
commit 05d7169c8b
No known key found for this signature in database
GPG key ID: 683B438C05A5DDF0

View file

@ -72,10 +72,6 @@ func BenchmarkJSONHandler(b *testing.B) {
} }
func benchmarkLogger(b *testing.B, l Logger) { func benchmarkLogger(b *testing.B, l Logger) {
type custom struct {
A string
B int8
}
var ( var (
bb = make([]byte, 10) bb = make([]byte, 10)
tt = time.Now() tt = time.Now()
@ -141,7 +137,6 @@ func TestLoggerOutput(t *testing.T) {
if !bytes.Equal([]byte(have)[25:], []byte(want)[25:]) { if !bytes.Equal([]byte(have)[25:], []byte(want)[25:]) {
t.Errorf("Error\nhave: %q\nwant: %q", have, want) t.Errorf("Error\nhave: %q\nwant: %q", have, want)
} }
} }
const termTimeFormat = "01-02|15:04:05.000" const termTimeFormat = "01-02|15:04:05.000"
@ -151,7 +146,6 @@ func BenchmarkAppendFormat(b *testing.B) {
b.Run("fmt time.Format", func(b *testing.B) { b.Run("fmt time.Format", func(b *testing.B) {
for i := 0; i < b.N; i++ { for i := 0; i < b.N; i++ {
fmt.Fprintf(io.Discard, "%s", now.Format(termTimeFormat)) fmt.Fprintf(io.Discard, "%s", now.Format(termTimeFormat))
} }
}) })
b.Run("time.AppendFormat", func(b *testing.B) { b.Run("time.AppendFormat", func(b *testing.B) {