Skip to content

Commit 6949cdc

Browse files
committed
nit: rename to clearer function paramters
1 parent edeee2f commit 6949cdc

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

attestation/attestation.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -326,16 +326,16 @@ func Fetch(host string) (*Document, error) {
326326
return &doc, nil
327327
}
328328

329-
const defaultATCBaseURL = "https://atc.tinfoil.sh"
329+
const defaultAttestationBundleURL = "https://atc.tinfoil.sh"
330330

331-
// FetchBundle retrieves a complete attestation bundle from the default ATC endpoint
331+
// FetchBundle retrieves a complete attestation bundle from the default endpoint
332332
func FetchBundle() (*Bundle, error) {
333-
return FetchBundleFrom(defaultATCBaseURL)
333+
return FetchBundleFrom(defaultAttestationBundleURL)
334334
}
335335

336-
// FetchBundleFrom retrieves a complete attestation bundle from a custom ATC base URL
337-
func FetchBundleFrom(atcBaseURL string) (*Bundle, error) {
338-
bundleURL := atcBaseURL + "/attestation"
336+
// FetchBundleFrom retrieves a complete attestation bundle from a custom base URL
337+
func FetchBundleFrom(attestationBundleURL string) (*Bundle, error) {
338+
bundleURL := attestationBundleURL + "/attestation"
339339

340340
resp, _, err := util.Get(bundleURL)
341341
if err != nil {

client/client.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -417,17 +417,17 @@ func VerifyFromATCJSON(repo string, sigstoreTrustedRootJSON []byte) (string, err
417417
return VerifyFromATCURLJSON("", repo, sigstoreTrustedRootJSON)
418418
}
419419

420-
// VerifyFromATCURLJSON fetches an attestation bundle from a custom ATC URL and verifies it.
421-
// If atcBaseURL is empty, defaults to https://atc.tinfoil.sh.
420+
// VerifyFromATCURLJSON fetches an attestation bundle from a custom URL and verifies it.
421+
// If attestationBundleURL is empty, defaults to https://atc.tinfoil.sh.
422422
// Returns the verification data as a JSON string.
423-
func VerifyFromATCURLJSON(atcBaseURL, repo string, sigstoreTrustedRootJSON []byte) (string, error) {
423+
func VerifyFromATCURLJSON(attestationBundleURL, repo string, sigstoreTrustedRootJSON []byte) (string, error) {
424424
var bundle *attestation.Bundle
425425
var err error
426426

427-
if atcBaseURL == "" {
427+
if attestationBundleURL == "" {
428428
bundle, err = attestation.FetchBundle()
429429
} else {
430-
bundle, err = attestation.FetchBundleFrom(atcBaseURL)
430+
bundle, err = attestation.FetchBundleFrom(attestationBundleURL)
431431
}
432432
if err != nil {
433433
return "", fmt.Errorf("failed to fetch bundle: %v", err)

0 commit comments

Comments
 (0)