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

fix: export no match / multiple match errors #95

Merged
merged 1 commit into from
Oct 7, 2024
Merged

Conversation

dtrudg
Copy link
Member

@dtrudg dtrudg commented Oct 7, 2024

OCIFileImage.Image or OCIFileImage.Index can fail due to no descriptors, or multiple descriptors, being selected by the provided matcher. The functions return a single image or index only.

These no match / multiple match error cases may require specific action in the caller. For example, when looking for an artifact associated with a container image, which may or may not be present.

Export ErrNoMatch and ErrMultipleMatches, and use these two errors across the Image and Index functions.

Fixes #94

`OCIFileImage.Image` or `OCIFileImage.Index` can fail due to no
descriptors, or multiple descriptors, being selected by the provided
matcher. The functions return a single image or index only.

These no match / multiple match error cases may require specific action
in the caller. For example, when looking for an artifact associated with
a container image, which may or may not be present.

Export `ErrNoMatch` and `ErrMultipleMatches`, and use these two errors
across the Image and Index functions.

Fixes sylabs#94
@dtrudg dtrudg marked this pull request as ready for review October 7, 2024 15:12
@dtrudg dtrudg requested a review from tri-adam October 7, 2024 15:12
@dtrudg dtrudg merged commit f29715a into sylabs:main Oct 7, 2024
10 checks passed
@dtrudg dtrudg deleted the issue-94 branch October 7, 2024 15:35
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 'not found' error for .Image / .ImageIndex
2 participants