From 34af565d7ecf9bb38cc378a915ac14a85af25fd2 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 3 Dec 2021 12:38:40 +0000 Subject: satisfy sonarqube --- internal/io/dlog/loggers/none.go | 16 ++++++++-------- internal/io/dlog/loggers/stdout.go | 10 ++++++++-- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/internal/io/dlog/loggers/none.go b/internal/io/dlog/loggers/none.go index 77168d7..f43c679 100644 --- a/internal/io/dlog/loggers/none.go +++ b/internal/io/dlog/loggers/none.go @@ -12,35 +12,35 @@ type none struct{} func (none) Start(ctx context.Context, wg *sync.WaitGroup) { wg.Done() } func (none) Log(now time.Time, message string) { - // This is empty because the none isn't logging but has to statify the interface. + // This is empty because the none isn't logging but has to satisfy the interface. } func (none) LogWithColors(now time.Time, message, coloredMessage string) { - // This is empty because the none isn't logging but has to statify the interface. + // This is empty because the none isn't logging but has to satisfy the interface. } func (none) Raw(now time.Time, message string) { - // This is empty because the none isn't logging but has to statify the interface. + // This is empty because the none isn't logging but has to satisfy the interface. } func (none) RawWithColors(now time.Time, message, coloredMessage string) { - // This is empty because the none isn't logging but has to statify the interface. + // This is empty because the none isn't logging but has to satisfy the interface. } func (none) Flush() { - // This is empty because the none isn't logging but has to statify the interface. + // This is empty because the none isn't logging but has to satisfy the interface. } func (none) Pause() { - // This is empty because the none isn't logging but has to statify the interface. + // This is empty because the none isn't logging but has to satisfy the interface. } func (none) Resume() { - // This is empty because the none isn't logging but has to statify the interface. + // This is empty because the none isn't logging but has to satisfy the interface. } func (none) Rotate() { - // This is empty because the none isn't logging but has to statify the interface. + // This is empty because the none isn't logging but has to satisfy the interface. } func (none) SupportsColors() bool { return false } diff --git a/internal/io/dlog/loggers/stdout.go b/internal/io/dlog/loggers/stdout.go index 0369ed7..ef30855 100644 --- a/internal/io/dlog/loggers/stdout.go +++ b/internal/io/dlog/loggers/stdout.go @@ -60,7 +60,13 @@ func (s *stdout) log(message string, nl bool) { func (s *stdout) Pause() { s.pauseCh <- struct{}{} } func (s *stdout) Resume() { s.resumeCh <- struct{}{} } -func (s *stdout) Flush() {} -func (s *stdout) Rotate() {} + +func (s *stdout) Flush() { + // This is empty because it isn't doing anything but has to satisfy the interface. +} + +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 } -- cgit v1.2.3