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

create mutate functions for oci.Signature #1199

Merged
merged 4 commits into from
Dec 14, 2021

Conversation

dekkagaijin
Copy link
Member

Ticket Link

#844

Release Note

NONE

@dekkagaijin dekkagaijin requested a review from mattmoor December 14, 2021 02:25
@dekkagaijin dekkagaijin force-pushed the mutate-sig branch 2 times, most recently from 643bbda to 62cf479 Compare December 14, 2021 02:48
Comment on lines 127 to 128
// SignatureAnnotations returns a new `oci.Signature` based on the provided one
func SignatureAnnotations(sig oci.Signature, newAnnotations map[string]string) (oci.Signature, error) {
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if we should expose mutate.Signature(sig, opts...) with functional options for fiddling with the individual properties. This would let us batch a set of alterations together and feels less verbose 🤔

Copy link
Member Author

Choose a reason for hiding this comment

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

Thought about that; we'd have to either expose the static.Options or create new ones here. I'd be OK with having a common options folder

@dekkagaijin dekkagaijin merged commit 28b03f7 into sigstore:main Dec 14, 2021
@dekkagaijin dekkagaijin deleted the mutate-sig branch December 14, 2021 23:52
@github-actions github-actions bot added this to the v1.5.0 milestone Dec 14, 2021
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.

2 participants