MCPcopy Create free account
hub / github.com/djherbis/buffer / NewWrapper

Function NewWrapper

wrapio/limitwrap.go:30–37  ·  view source on GitHub ↗

NewWrapper creates a Wrapper based on ReadWriterAt rwa. L is the current length, O is the current offset, and N is offset at which we "wrap".

(rwa ReadWriterAt, L, O, N int64)

Source from the content-addressed store, hash-verified

28// NewWrapper creates a Wrapper based on ReadWriterAt rwa.
29// L is the current length, O is the current offset, and N is offset at which we "wrap".
30func NewWrapper(rwa ReadWriterAt, L, O, N int64) *Wrapper {
31 return &Wrapper{
32 L: L,
33 O: O,
34 N: N,
35 rwa: rwa,
36 }
37}
38
39// Len returns the # of bytes in the Wrapper
40func (wpr *Wrapper) Len() int64 {

Callers 3

NewFileFunction · 0.92
UnmarshalBinaryMethod · 0.92
TestWrapperFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestWrapperFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…