github.com/anchore/syft@v1.38.2/syft/internal/fileresolver/empty.go (about) 1 package fileresolver 2 3 import ( 4 "context" 5 "io" 6 7 "github.com/anchore/syft/syft/file" 8 ) 9 10 var _ file.WritableResolver = (*Empty)(nil) 11 12 type Empty struct{} 13 14 func (e Empty) FileContentsByLocation(_ file.Location) (io.ReadCloser, error) { 15 return nil, nil 16 } 17 18 func (e Empty) HasPath(_ string) bool { 19 return false 20 } 21 22 func (e Empty) FilesByPath(_ ...string) ([]file.Location, error) { 23 return nil, nil 24 } 25 26 func (e Empty) FilesByGlob(_ ...string) ([]file.Location, error) { 27 return nil, nil 28 } 29 30 func (e Empty) FilesByMIMEType(_ ...string) ([]file.Location, error) { 31 return nil, nil 32 } 33 34 func (e Empty) RelativeFileByPath(_ file.Location, _ string) *file.Location { 35 return nil 36 } 37 38 func (e Empty) AllLocations(_ context.Context) <-chan file.Location { 39 return nil 40 } 41 42 func (e Empty) FileMetadataByLocation(_ file.Location) (file.Metadata, error) { 43 return file.Metadata{}, nil 44 } 45 46 func (e Empty) Write(_ file.Location, _ io.Reader) error { 47 return nil 48 }