Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
sclevine committed Oct 28, 2024
1 parent f8098fd commit 02738ef
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/autoupdate/agent/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,9 @@ func (w *lineLogger) Write(p []byte) (n int, err error) {
if len(lines) == 0 || err != nil {
return n, trace.Wrap(err)
}
w.log.Log(w.ctx, w.level, w.last.String())
w.last.Reset()
w.Flush()
for _, line := range lines[:len(lines)-1] {
w.log.Log(w.ctx, w.level, string(line))
w.log.Log(w.ctx, w.level, string(line)) //nolint:sloglint
n += len(line)
}
n2, err := w.last.Write(lines[0])
Expand All @@ -154,6 +153,6 @@ func (w *lineLogger) Write(p []byte) (n int, err error) {
}

func (w *lineLogger) Flush() {
w.log.Log(w.ctx, w.level, w.last.String())
w.log.Log(w.ctx, w.level, w.last.String()) //nolint:sloglint
w.last.Reset()
}

0 comments on commit 02738ef

Please sign in to comment.