Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make c/image/image available as c/image/internal/image #1576

Merged
merged 3 commits into from Jun 13, 2022

Commits on Jun 10, 2022

  1. Move c/image/image to c/image/internal/image

    ... to allow us to add more APIs using a new mechanism.
    
    Currently c/image/image exposes images as types.Image, which we can't change;
    so, let's define a new API that will return a different type that we can modify
    as necessary.
    
    For now, make that new API internal, at least until we fix the way edits
    are bundled with data-to-be-edited in types.BlobInfo.
    
    c/image/image continues to exist, but currently only trivially forwards
    all calls to the moved c/image/internal/image.
    
    As a minimal proof of concept, none of the users of c/image/image in the repo
    have been modified; they now refer to the compatibility forwarders.
    
    Signed-off-by: Miloslav Trmač <mitr@redhat.com>
    mtrmac committed Jun 10, 2022
    Copy the full SHA
    46dccab View commit details
    Browse the repository at this point in the history
  2. Move all internal users of image/v5/image to image/v5/internal/image

    ... to skip the compatibility layer.
    
    Signed-off-by: Miloslav Trmač <mitr@redhat.com>
    mtrmac committed Jun 10, 2022
    Copy the full SHA
    320a1ff View commit details
    Browse the repository at this point in the history
  3. Add image.FromReference, replace most users of image.FromSource

    This avoids some repetition, and (in all but one case) fixes
    a missing .Close() on a failure path.
    
    Signed-off-by: Miloslav Trmač <mitr@redhat.com>
    mtrmac committed Jun 10, 2022
    Copy the full SHA
    08a6499 View commit details
    Browse the repository at this point in the history