daemon/logger: fix empty-lines (revive)

daemon/logger/loggertest/logreader.go:58:43: empty-lines: extra empty line at the end of a block (revive)
    daemon/logger/ring_test.go:119:34: empty-lines: extra empty line at the end of a block (revive)
    daemon/logger/adapter_test.go:37:12: empty-lines: extra empty line at the end of a block (revive)
    daemon/logger/adapter_test.go:41:44: empty-lines: extra empty line at the end of a block (revive)
    daemon/logger/adapter_test.go:170:9: empty-lines: extra empty line at the end of a block (revive)
    daemon/logger/loggerutils/sharedtemp_test.go:152:43: empty-lines: extra empty line at the end of a block (revive)
    daemon/logger/loggerutils/sharedtemp.go:124:117: empty-lines: extra empty line at the end of a block (revive)
    daemon/logger/syslog/syslog.go:249:87: empty-lines: extra empty line at the end of a block (revive)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2022-09-23 22:30:57 +02:00
parent 9d9cca49b4
commit 0695a910c6
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
7 changed files with 0 additions and 9 deletions

View File

@ -47,7 +47,6 @@ func (l *mockLoggingPlugin) StartLogging(file string, info Info) error {
l.c.Broadcast()
return
}
l.c.L.Lock()
@ -55,7 +54,6 @@ func (l *mockLoggingPlugin) StartLogging(file string, info Info) error {
l.c.L.Unlock()
l.c.Broadcast()
}
}()
return nil
}
@ -172,7 +170,6 @@ func TestAdapterReadLogs(t *testing.T) {
assert.Check(t, !ok, "expected message channel to be closed")
case <-time.After(10 * time.Second):
t.Fatal("timeout waiting for message channel to close")
}
lw.ConsumerGone()

View File

@ -661,7 +661,6 @@ func TestCollectBatchTicker(t *testing.T) {
assert.Equal(t, logline+" 3", aws.StringValue(argument.LogEvents[0].Message))
stream.Close()
}
func TestCollectBatchMultilinePattern(t *testing.T) {

View File

@ -65,7 +65,6 @@ func makeTestMessages() []*logger.Message {
{Source: "stderr", Timestamp: time.Now().Add(-1 * 10 * time.Minute), Line: []byte("just one more message")},
{Source: "stdout", Timestamp: time.Now().Add(-1 * 90 * time.Minute), Line: []byte("someone adjusted the clock")},
}
}
func (tr Reader) testTail(t *testing.T, live bool) {

View File

@ -138,7 +138,6 @@ func (c *sharedTempFileConverter) openExisting(st stfcState, id stfID, v sharedT
res := <-wait
return res.fr, res.err
}
func (c *sharedTempFileConverter) convert(f *os.File) (converted *os.File, size int64, err error) {

View File

@ -207,7 +207,6 @@ func TestSharedTempFileConverter(t *testing.T) {
assert.Check(t, src.Close())
assert.NilError(t, os.Remove(name))
checkDirEmpty(t, dir)
})
}

View File

@ -142,7 +142,6 @@ func TestRingDrain(t *testing.T) {
if len(ls) != 0 {
t.Fatalf("expected 0 messages on 2nd drain: %v", ls)
}
}
type nopLogger struct{}

View File

@ -265,5 +265,4 @@ func parseLogFormat(logFormat, proto string) (syslog.Formatter, syslog.Framer, e
default:
return nil, nil, errors.New("Invalid syslog format")
}
}