github.com/iikira/iikira-go-utils@v0.0.0-20230610031953-f2cb11cde33a/requester/rio/part.go (about)

     1  package rio
     2  
     3  import "io"
     4  
     5  type (
     6  	PartReaderLen64 struct {
     7  		Part io.Reader
     8  		Size int64
     9  	}
    10  )
    11  
    12  func (p2 *PartReaderLen64) Read(p []byte) (n int, err error) {
    13  	return p2.Part.Read(p)
    14  }
    15  
    16  func (p2 *PartReaderLen64) Len() int64 {
    17  	return p2.Size
    18  }