github.com/azurearcforkubernetes/oras@v0.4.0/pkg/content/readerat.go (about) 1 package content 2 3 import ( 4 "io" 5 6 "github.com/containerd/containerd/content" 7 ) 8 9 // ensure interface 10 var ( 11 _ content.ReaderAt = sizeReaderAt{} 12 ) 13 14 type readAtCloser interface { 15 io.ReaderAt 16 io.Closer 17 } 18 19 type sizeReaderAt struct { 20 readAtCloser 21 size int64 22 } 23 24 func (ra sizeReaderAt) Size() int64 { 25 return ra.size 26 } 27 28 type nopCloser struct { 29 io.ReaderAt 30 } 31 32 func (nopCloser) Close() error { 33 return nil 34 }