Skip to content

Commit

Permalink
Rename PeekCollection to Peek
Browse files Browse the repository at this point in the history
  • Loading branch information
jonastheis committed Nov 2, 2023
1 parent 6a0b43d commit 9711af4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions serializer/stream/read.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func ReadObjectWithSize[T any](reader io.Reader, lenType serializer.SeriLengthPr
return result, nil
}

func ReadObjectFromReader[T any](reader io.Reader, objectFromReaderFunc func(reader io.Reader) (T, error)) (T, error) {
func ReadObjectFromReader[T any](reader io.ReadSeeker, objectFromReaderFunc func(reader io.ReadSeeker) (T, error)) (T, error) {
var result T

result, err := objectFromReaderFunc(reader)
Expand All @@ -89,7 +89,7 @@ func ReadObjectFromReader[T any](reader io.Reader, objectFromReaderFunc func(rea
return result, nil
}

func PeekCollectionSize(reader io.ReadSeeker, lenType serializer.SeriLengthPrefixType) (int, error) {
func Peek(reader io.ReadSeeker, lenType serializer.SeriLengthPrefixType) (int, error) {
startOffset, err := Offset(reader)
if err != nil {
return 0, ierrors.Wrap(err, "failed to get start offset")
Expand Down

0 comments on commit 9711af4

Please sign in to comment.