Skip to content

Commit

Permalink
fixed comments for Remaining and ReadRemaining
Browse files Browse the repository at this point in the history
  • Loading branch information
jonbarrow committed Sep 26, 2023
1 parent 38a6143 commit aa29221
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stream_in.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ type StreamIn struct {
Server *Server
}

// Remaining reads a bool
// Remaining returns the amount of data left to be read in the buffer
func (stream *StreamIn) Remaining() int {
return len(stream.Bytes()[stream.ByteOffset():])
}

// ReadRemaining reads a bool
// ReadRemaining reads all the data left to be read in the buffer
func (stream *StreamIn) ReadRemaining() []byte {
// TODO - Should we do a bounds check here? Or just allow empty slices?
return stream.ReadBytesNext(int64(stream.Remaining()))
Expand Down

0 comments on commit aa29221

Please sign in to comment.