Skip to content

Commit

Permalink
Add comments to write p->i+1
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoertao committed Oct 24, 2018
1 parent ff65045 commit c7f256d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions console/pipeline/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ func (self *ByteLogger) insertStamp(b []byte, newLine *bool) ([]byte, error) {
*newLine = false
}
if b[i] == '\n' {
// add 1 to the index in order to also write the newline characater. Slicing of the array only contains p to i-1 if not add 1
buf.Write(b[p:i+1])
*newLine = true
p = i + 1
Expand Down

0 comments on commit c7f256d

Please sign in to comment.