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:
parent
f930559076
commit
1437037ed2
2 changed files with 7 additions and 8 deletions
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue