We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 953f11d commit bba1d78Copy full SHA for bba1d78
pkg/sif/sif.go
@@ -8,6 +8,8 @@ import (
8
"io"
9
10
v1 "github.com/google/go-containerregistry/pkg/v1"
11
+ "github.com/google/go-containerregistry/pkg/v1/match"
12
+ "github.com/google/go-containerregistry/pkg/v1/partial"
13
"github.com/sylabs/sif/v2/pkg/sif"
14
)
15
@@ -53,3 +55,14 @@ func (f *OCIFileImage) Offset(h v1.Hash) (int64, error) {
53
55
54
56
return d.Offset(), nil
57
}
58
+
59
+// FindManifests finds the manifests stored in f that are selected by m. If m is nil, all manifests
60
+// are selected.
61
+func (f *OCIFileImage) FindManifests(m match.Matcher, _ ...Option) ([]v1.Descriptor, error) {
62
+ ri, err := f.RootIndex()
63
+ if err != nil {
64
+ return nil, err
65
+ }
66
67
+ return partial.FindManifests(ri, matchAllIfNil(m))
68
+}
0 commit comments