Skip to content

Commit 36f746a

Browse files
committed
ubuntu: use Layer.FS method
Signed-off-by: Hank Donnay <[email protected]>
1 parent 612748f commit 36f746a

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

ubuntu/distributionscanner.go

+1-7
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import (
1414

1515
"github.com/quay/claircore"
1616
"github.com/quay/claircore/indexer"
17-
"github.com/quay/claircore/pkg/tarfs"
1817
)
1918

2019
const (
@@ -52,12 +51,7 @@ func (ds *DistributionScanner) Scan(ctx context.Context, l *claircore.Layer) ([]
5251
"layer", l.Hash.String())
5352
zlog.Debug(ctx).Msg("start")
5453
defer zlog.Debug(ctx).Msg("done")
55-
rd, err := l.Reader()
56-
if err != nil {
57-
return nil, fmt.Errorf("ubuntu: unable to open layer: %w", err)
58-
}
59-
defer rd.Close()
60-
sys, err := tarfs.New(rd)
54+
sys, err := l.FS()
6155
if err != nil {
6256
return nil, fmt.Errorf("ubuntu: unable to open layer: %w", err)
6357
}

0 commit comments

Comments
 (0)