github.com/anchore/syft@v1.38.2/syft/file/location_read_closer.go (about) 1 package file 2 3 import "io" 4 5 // LocationReadCloser combines a Location with a ReadCloser for accessing file content with location metadata. 6 type LocationReadCloser struct { 7 Location 8 io.ReadCloser 9 } 10 11 func NewLocationReadCloser(location Location, reader io.ReadCloser) LocationReadCloser { 12 return LocationReadCloser{ 13 Location: location, 14 ReadCloser: reader, 15 } 16 }