Skip to content

Commit

Permalink
Fix golangci-lint issue
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengtianbao committed Jul 12, 2022
1 parent c12a012 commit 2c52c51
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/tailer/logstream/filestream.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ func (fs *fileStream) stream(ctx context.Context, wg *sync.WaitGroup, waker wake
if count > 0 {
total += count
glog.V(2).Infof("%v: decode and send", fd)
needSend := append(lastBytes, b[:count]...)
needSend := lastBytes
needSend = append(needSend, b[:count]...)
sendCount := decodeAndSend(ctx, fs.lines, fs.pathname, len(needSend), needSend, partial)
if sendCount < len(needSend) {
lastBytes = append([]byte{}, needSend[sendCount:]...)
Expand Down

0 comments on commit 2c52c51

Please sign in to comment.