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 verification example #194

Merged
merged 1 commit into from
May 30, 2024
Merged

Conversation

cmurphy
Copy link
Contributor

@cmurphy cmurphy commented May 30, 2024

GetTrustedrootJSON was removed in 40d7422, so update the example for the new API.

Summary

Release Note

Documentation

Copy link
Member

@codysoyland codysoyland left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution, @cmurphy! Just a couple of suggestions to remove these already default values.

@@ -58,7 +58,13 @@ To verify a bundle with the Go API, you'll need to:
Going through this step-by-step, we'll start by loading the trusted root from the Sigstore TUF repo:

```go
trustedrootJSON, err := tuf.GetTrustedrootJSON("tuf-repo-cdn.sigstore.dev", "tufcache")
opts := tuf.DefaultOptions()
opts.RepositoryBaseURL = "https://tuf-repo-cdn.sigstore.dev"
Copy link
Member

Choose a reason for hiding this comment

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

This is the default base URL, so we can omit this line.

Suggested change
opts.RepositoryBaseURL = "https://tuf-repo-cdn.sigstore.dev"

@@ -187,7 +193,13 @@ import (
)

func main() {
trustedrootJSON, err := tuf.GetTrustedrootJSON("tuf-repo-cdn.sigstore.dev", "tufcache")
opts := tuf.DefaultOptions()
opts.RepositoryBaseURL = "https://tuf-repo-cdn.sigstore.dev"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
opts.RepositoryBaseURL = "https://tuf-repo-cdn.sigstore.dev"

`GetTrustedrootJSON` was removed in 40d7422, so update the example for
the new API.

Signed-off-by: Colleen Murphy <colleenmurphy@google.com>
@cmurphy
Copy link
Contributor Author

cmurphy commented May 30, 2024

Fixed, thanks!

@haydentherapper haydentherapper merged commit 3a6a109 into sigstore:main May 30, 2024
10 checks passed
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.

3 participants