Ver Fonte

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>
Sebastiaan van Stijn há 2 anos atrás
pai
commit
0695a910c6

+ 0 - 3
daemon/logger/adapter_test.go

@@ -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()
 

+ 0 - 1
daemon/logger/awslogs/cloudwatchlogs_test.go

@@ -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) {

+ 0 - 1
daemon/logger/loggertest/logreader.go

@@ -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) {

+ 0 - 1
daemon/logger/loggerutils/sharedtemp.go

@@ -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) {

+ 0 - 1
daemon/logger/loggerutils/sharedtemp_test.go

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

+ 0 - 1
daemon/logger/ring_test.go

@@ -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{}

+ 0 - 1
daemon/logger/syslog/syslog.go

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