func (ds *DistributionScanner) Scan(ctx context.Context, l *claircore.Layer) ([]*claircore.Distribution, error) {
	defer trace.StartRegion(ctx, "Scanner.Scan").End()
	log := zerolog.Ctx(ctx).With().
		Str("component", "oracle/DistributionScanner.Scan").
		Str("version", ds.Version()).
		Str("layer", l.Hash.String()).
		Logger()
	log.Debug().Msg("start")
	defer log.Debug().Msg("done")
	files, err := l.Files(osReleasePath, issuePath)
	if err != nil {
		log.Debug().Msg("didn't find an os-release or issues file")
		return nil, nil
	}
	for _, buff := range files {
		dist := ds.parse(buff)
		if dist != nil {
			return []*claircore.Distribution{dist}, nil
		}
	}
	return []*claircore.Distribution{}, nil
}
// Scan will inspect the layer for an os-release or lsb-release file
// and perform a regex match for keywords indicating the associated Oracle release
//
// If neither file is found a (nil,nil) is returned.
// If the files are found but all regexp fail to match an empty slice is returned.
Scan will inspect the layer for an os-release or lsb-release file
and perform a regex match for keywords indicating the associated Oracle release

If neither file is found a (nil,nil) is returned.
If the files are found but all regexp fail to match an empty slice is returned.
// Scan will inspect the layer for an os - release or lsb - release file // and perform a regex match for keywords indicating the associated Oracle release // // If neither file is found a ( nil nil ) is returned . // If the files are found but all regexp fail to match an empty slice is returned .
func (ds *DistributionScanner) Scan(ctx context.Context, l *claircore.Layer) ([]*claircore.Distribution, error) {
	defer trace.StartRegion(ctx, "Scanner.Scan").End()
	log := zerolog.Ctx(ctx).With().
		Str("component", "oracle/DistributionScanner.Scan").
		Str("version", ds.Version()).
		Str("layer", l.Hash.String()).
		Logger()
	log.Debug().Msg("start")
	defer log.Debug().Msg("done")
	files, err := l.Files(osReleasePath, issuePath)
	if err != nil {
		log.Debug().Msg("didn't find an os-release or issues file")
		return nil, nil
	}
	for _, buff := range files {
		dist := ds.parse(buff)
		if dist != nil {
			return []*claircore.Distribution{dist}, nil
		}
	}
	return []*claircore.Distribution{}, nil
}
func ( ds * DistributionScanner ) Scan ( ctx context . Context , l * claircore . Layer ) ( [ ] * claircore . Distribution , error ) { defer trace . StartRegion ( ctx , " " ) . End ( ) log := zerolog . Ctx ( ctx ) . With ( ) . Str ( " " , " " ) . Str ( " " , ds . Version ( ) ) . Str ( " " , l . Hash . String ( ) ) . Logger ( ) log . Debug ( ) . Msg ( " " ) defer log . Debug ( ) . Msg ( " " ) files , err := l . Files ( osReleasePath , issuePath ) if err != nil { log . Debug ( ) . Msg ( " " ) return nil , nil } for _ , buff := range files { dist := ds . parse ( buff ) if dist != nil { return [ ] * claircore . Distribution { dist } , nil } } return [ ] * claircore . Distribution { } , nil }
Scan will inspect the layer for an os-release or lsb-release file
and perform a regex match for keywords indicating the associated Oracle release
Scan will inspect the layer for an os - release or lsb - release file and perform a regex match for keywords indicating the associated Oracle release