daemon/logger/awslogs: format code with gofumpt

Formatting the code with https://github.com/mvdan/gofumpt

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2022-01-20 14:21:25 +01:00
parent f930559076
commit 1437037ed2
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C
2 changed files with 7 additions and 8 deletions

View file

@ -562,7 +562,7 @@ func (l *logStream) collectBatch(created chan bool) {
ticker := newTicker(flushInterval)
var eventBuffer []byte
var eventBufferTimestamp int64
var batch = newEventBatch()
batch := newEventBatch()
for {
select {
case t := <-ticker.C:
@ -691,7 +691,6 @@ func (l *logStream) publishBatch(batch *eventBatch) {
cwEvents := unwrapEvents(batch.events())
nextSequenceToken, err := l.putLogEvents(cwEvents, l.sequenceToken)
if err != nil {
if apiErr := (*types.DataAlreadyAcceptedException)(nil); errors.As(err, &apiErr) {
// already submitted, just grab the correct sequence token

View file

@ -998,7 +998,7 @@ func TestCollectBatchClose(t *testing.T) {
NextSequenceToken: aws.String(nextSequenceToken),
}, nil
}
var ticks = make(chan time.Time)
ticks := make(chan time.Time)
newTicker = func(_ time.Duration) *time.Ticker {
return &time.Ticker{
C: ticks,
@ -1100,7 +1100,7 @@ func TestCollectBatchLineSplit(t *testing.T) {
NextSequenceToken: aws.String(nextSequenceToken),
}, nil
}
var ticks = make(chan time.Time)
ticks := make(chan time.Time)
newTicker = func(_ time.Duration) *time.Ticker {
return &time.Ticker{
C: ticks,
@ -1148,7 +1148,7 @@ func TestCollectBatchLineSplitWithBinary(t *testing.T) {
NextSequenceToken: aws.String(nextSequenceToken),
}, nil
}
var ticks = make(chan time.Time)
ticks := make(chan time.Time)
newTicker = func(_ time.Duration) *time.Ticker {
return &time.Ticker{
C: ticks,
@ -1196,7 +1196,7 @@ func TestCollectBatchMaxEvents(t *testing.T) {
NextSequenceToken: aws.String(nextSequenceToken),
}, nil
}
var ticks = make(chan time.Time)
ticks := make(chan time.Time)
newTicker = func(_ time.Duration) *time.Ticker {
return &time.Ticker{
C: ticks,
@ -1251,7 +1251,7 @@ func TestCollectBatchMaxTotalBytes(t *testing.T) {
}, nil
}
var ticks = make(chan time.Time)
ticks := make(chan time.Time)
newTicker = func(_ time.Duration) *time.Ticker {
return &time.Ticker{
C: ticks,
@ -1332,7 +1332,7 @@ func TestCollectBatchMaxTotalBytesWithBinary(t *testing.T) {
}, nil
}
var ticks = make(chan time.Time)
ticks := make(chan time.Time)
newTicker = func(_ time.Duration) *time.Ticker {
return &time.Ticker{
C: ticks,