Skip to content

Commit

Permalink
daemon/logger: fix empty-lines (revive)
Browse files Browse the repository at this point in the history
    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>
  • Loading branch information
thaJeztah committed Sep 27, 2022
1 parent 9d9cca4 commit 0695a91
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 9 deletions.
3 changes: 0 additions & 3 deletions daemon/logger/adapter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,13 @@ func (l *mockLoggingPlugin) StartLogging(file string, info Info) error {

l.c.Broadcast()
return

}

l.c.L.Lock()
l.logs = append(l.logs, &msg)
l.c.L.Unlock()
l.c.Broadcast()
}

}()
return nil
}
Expand Down Expand Up @@ -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()

Expand Down
1 change: 0 additions & 1 deletion daemon/logger/awslogs/cloudwatchlogs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion daemon/logger/loggertest/logreader.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion daemon/logger/loggerutils/sharedtemp.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion daemon/logger/loggerutils/sharedtemp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ func TestSharedTempFileConverter(t *testing.T) {
assert.Check(t, src.Close())
assert.NilError(t, os.Remove(name))
checkDirEmpty(t, dir)

})
}

Expand Down
1 change: 0 additions & 1 deletion daemon/logger/ring_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{}
Expand Down
1 change: 0 additions & 1 deletion daemon/logger/syslog/syslog.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,5 +265,4 @@ func parseLogFormat(logFormat, proto string) (syslog.Formatter, syslog.Framer, e
default:
return nil, nil, errors.New("Invalid syslog format")
}

}

0 comments on commit 0695a91

Please sign in to comment.