Skip to content

Commit

Permalink
Improve formatting of attestations summary
Browse files Browse the repository at this point in the history
  • Loading branch information
errordeveloper committed Sep 28, 2023
1 parent 31f7ebb commit 5f0600c
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tape/app/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,16 @@ func (c *TapeViewCommand) PrintInfo(ctx context.Context, outputInfo *artefactInf
if outputInfo.AttestationsSummary != nil {
fmt.Printf(" Attestations Summary:\n")
fmt.Printf(" Number of Statements: %v\n", outputInfo.AttestationsSummary.NumStamentes)
fmt.Printf(" Predicate Types: %v\n", outputInfo.AttestationsSummary.PredicateTypes)
fmt.Printf(" Subjects: %v\n", outputInfo.AttestationsSummary.Subjects)
if outputInfo.AttestationsSummary.NumStamentes > 0 {
fmt.Printf(" Predicate Types:\n")
for i := range outputInfo.AttestationsSummary.PredicateTypes {
fmt.Printf(" %s\n", outputInfo.AttestationsSummary.PredicateTypes[i])
}
fmt.Printf(" Subjects:\n")
for i := range outputInfo.AttestationsSummary.Subjects {
fmt.Printf(" %s@sha256:%s\n", outputInfo.AttestationsSummary.Subjects[i].Name, outputInfo.AttestationsSummary.Subjects[i].Digest.String())
}
}
}
}
return nil
Expand Down

0 comments on commit 5f0600c

Please sign in to comment.