Skip to content

Commit

Permalink
Line up comments, fix typo (#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-jchacon authored Sep 12, 2022
1 parent a3ba62c commit 8a5b29c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions services/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,11 @@ func NewLimitedBuffer(max uint) *LimitedBuffer {
// Write acts exactly as a bytes.Buffer defines except if the underlying
// buffer has reached the max size no more bytes will be added.
// TODO: Implement remaining bytes.Buffer methods if needed.
// NOTE: This is not an error condition and instead no more bytes
// NOTE:
//
// This is not an error condition and instead no more bytes
// will be written and normal return will happen so writes
// so not fail. Use the Truncated() method
// do not fail. Use the Truncated() method
// to determine if this has happened.
func (l *LimitedBuffer) Write(p []byte) (int, error) {
if l.full || uint(len(p)+l.buf.Len()) > l.max {
Expand Down

0 comments on commit 8a5b29c

Please sign in to comment.