From a3e10757a52fa47a0608afd88986162ca5eb22cc Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 23 Feb 2024 15:01:41 +0200 Subject: lint warnings --- internal/io/dlog/loggers/file.go | 7 +++---- internal/io/dlog/loggers/stdout.go | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'internal/io/dlog/loggers') diff --git a/internal/io/dlog/loggers/file.go b/internal/io/dlog/loggers/file.go index 6a09353..8e567bc 100644 --- a/internal/io/dlog/loggers/file.go +++ b/internal/io/dlog/loggers/file.go @@ -12,8 +12,6 @@ import ( "github.com/mimecast/dtail/internal/config" ) -type fileWriter struct{} - type fileMessageBuf struct { now time.Time message string @@ -124,9 +122,10 @@ func (f *file) write(m *fileMessageBuf) { writer = f.getWriter(f.strategy.FileBase) } - writer.WriteString(m.message) + // Don't report any error, we won't be able to log it anyway! + _, _ = writer.WriteString(m.message) if m.nl { - writer.WriteByte('\n') + _ = writer.WriteByte('\n') } } diff --git a/internal/io/dlog/loggers/stdout.go b/internal/io/dlog/loggers/stdout.go index ef30855..b024243 100644 --- a/internal/io/dlog/loggers/stdout.go +++ b/internal/io/dlog/loggers/stdout.go @@ -69,4 +69,4 @@ func (s *stdout) Rotate() { // This is empty because it isn't doing anything but has to satisfy the interface. } -func (stdout) SupportsColors() bool { return true } +func (*stdout) SupportsColors() bool { return true } -- cgit v1.2.3