Skip to content

Add constants for "index.json" and "blobs" alongside "oci-layout" as parts of the layout specification#1071

Merged
tianon merged 1 commit into
opencontainers:mainfrom
sparr:path_constants
Jun 23, 2023
Merged

Add constants for "index.json" and "blobs" alongside "oci-layout" as parts of the layout specification#1071
tianon merged 1 commit into
opencontainers:mainfrom
sparr:path_constants

Conversation

@sparr

@sparr sparr commented Jun 2, 2023

Copy link
Copy Markdown
Contributor

The layout spec requires three named files/directories. The oci-layout file name is already exposed as a constant from this package. This PR adds exported constants for index.json and blobs.

Closes #1069

@sudo-bmitch sudo-bmitch left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few minor comment nits. While we're here, I think we should also fix line 18. My attempt would look like:

// ImageLayoutFile is the file name containing ImageLayout in an OCI Image Layout

Comment thread specs-go/v1/layout.go Outdated
Comment thread specs-go/v1/layout.go Outdated
alongside "oci-layout" as parts of the layout specification

Signed-off-by: Clarence "Sparr" Risher <clrnc@amazon.com>
@sparr sparr force-pushed the path_constants branch from 9c0eb64 to 73f386c Compare June 2, 2023 19:02

@sudo-bmitch sudo-bmitch left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@TerryHowe TerryHowe left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

although obviously not a maintainer

@tianon

tianon commented Jun 23, 2023

Copy link
Copy Markdown
Member

(I don't think I personally plan to use these in the tools I've written that currently hard-code these values, but I do think adding them increases the consistency of the constants we provide ❤️)

@tianon tianon merged commit b5ec432 into opencontainers:main Jun 23, 2023
@sparr sparr deleted the path_constants branch June 23, 2023 03:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Export constants for "blobs" and "index.json"

4 participants