Skip to content

Commit

Permalink
lint: unnecessary fmt.sprintf
Browse files Browse the repository at this point in the history
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
  • Loading branch information
ramonpetgrave64 committed May 17, 2024
1 parent 1538dba commit 5878167
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cli/slsa-verifier/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func check(err error) {

func envWarnings() {
if options.TestingEnabled() {
slog.Warn(fmt.Sprintf("WARNING: Insecure SLSA_VERIFIER_TESTING is enabled.\n"))
slog.Warn("WARNING: Insecure SLSA_VERIFIER_TESTING is enabled.\n")
}
}

Expand Down
2 changes: 1 addition & 1 deletion cli/slsa-verifier/verify/verify_npm_package.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func (c *VerifyNpmPackageCommand) Exec(ctx context.Context, tarballs []string) (
}

if c.AttestationsPath == "" {
slog.Error(fmt.Sprintf("--attestations-path is required.\n\n"))
slog.Error("--attestations-path is required.\n\n")
return nil, err
}
provenanceOpts := &options.ProvenanceOpts{
Expand Down
2 changes: 1 addition & 1 deletion verifiers/internal/gha/provenance.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ func VerifyProvenanceSignature(ctx context.Context, trustedRoot *TrustedRoot,
}

// Fallback on using the redis search index to get matching UUIDs.
slog.Warn(fmt.Sprintf("No certificate provided, trying Redis search index to find entries by subject digest\n"))
slog.Warn("No certificate provided, trying Redis search index to find entries by subject digest\n")

// Verify the provenance and return the signing certificate.
return SearchValidSignedAttestation(ctx, artifactHash,
Expand Down

0 comments on commit 5878167

Please sign in to comment.