summaryrefslogtreecommitdiff
path: root/internal/io/dlog/loggers
diff options
context:
space:
mode:
authorPaul Buetow <pbuetow@mimecast.com>2024-02-23 15:01:41 +0200
committerPaul Buetow <pbuetow@mimecast.com>2024-02-23 15:01:41 +0200
commita3e10757a52fa47a0608afd88986162ca5eb22cc (patch)
treedce61c6695bc3badd455a64767252e6947b32711 /internal/io/dlog/loggers
parent85780654df870dc4170b93a8ed5a5dbfa917fe5d (diff)
lint warnings
Diffstat (limited to 'internal/io/dlog/loggers')
-rw-r--r--internal/io/dlog/loggers/file.go7
-rw-r--r--internal/io/dlog/loggers/stdout.go2
2 files changed, 4 insertions, 5 deletions
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 }