Skip to content

Commit

Permalink
Use condensed syntax
Browse files Browse the repository at this point in the history
Signed-off-by: Cody Soyland <[email protected]>
  • Loading branch information
codysoyland committed Dec 20, 2024
1 parent a5ac3b6 commit 7181972
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pkg/verify/signature.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,7 @@ func verifyEnvelopeWithArtifact(verifier signature.Verifier, envelope EnvelopeCo
if err != nil {
return fmt.Errorf("could not verify artifact: unable to extract statement from envelope: %w", err)
}
err = limitSubjects(statement)
if err != nil {
if err = limitSubjects(statement); err != nil {
return err
}

Expand Down Expand Up @@ -212,8 +211,7 @@ func verifyEnvelopeWithArtifactDigest(verifier signature.Verifier, envelope Enve
if err != nil {
return fmt.Errorf("could not verify artifact: unable to extract statement from envelope: %w", err)
}
err = limitSubjects(statement)
if err != nil {
if err = limitSubjects(statement); err != nil {
return err
}

Expand Down

0 comments on commit 7181972

Please sign in to comment.