From 8e6b07a1812011fe6faf8ffb801ce5d8d927b3f3 Mon Sep 17 00:00:00 2001 From: Xiaoxuan Wang Date: Mon, 4 Sep 2023 06:57:28 +0000 Subject: [PATCH] removed the RS variable name Signed-off-by: Xiaoxuan Wang --- content/oci/storage.go | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/content/oci/storage.go b/content/oci/storage.go index 9a07a2ec4..a1803e9a4 100644 --- a/content/oci/storage.go +++ b/content/oci/storage.go @@ -44,7 +44,7 @@ var bufPool = sync.Pool{ // Storage is a CAS based on file system with the OCI-Image layout. // Reference: https://github.com/opencontainers/image-spec/blob/v1.1.0-rc4/image-layout.md type Storage struct { - rs *ReadOnlyStorage + *ReadOnlyStorage // root is the root directory of the OCI layout. root string // ingestRoot is the root directory of the temporary ingest files. @@ -59,20 +59,12 @@ func NewStorage(root string) (*Storage, error) { } return &Storage{ - rs: NewStorageFromFS(os.DirFS(rootAbs)), - root: rootAbs, - ingestRoot: filepath.Join(rootAbs, "ingest"), + ReadOnlyStorage: NewStorageFromFS(os.DirFS(rootAbs)), + root: rootAbs, + ingestRoot: filepath.Join(rootAbs, "ingest"), }, nil } -func (s *Storage) Fetch(ctx context.Context, target ocispec.Descriptor) (io.ReadCloser, error) { - return s.rs.Fetch(ctx, target) -} - -func (s *Storage) Exists(ctx context.Context, target ocispec.Descriptor) (bool, error) { - return s.rs.Exists(ctx, target) -} - // Push pushes the content, matching the expected descriptor. func (s *Storage) Push(_ context.Context, expected ocispec.Descriptor, content io.Reader) error { path, err := blobPath(expected.Digest)