Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.

Commit

Permalink
fix: use optional plural form (oras-project#659)
Browse files Browse the repository at this point in the history
Signed-off-by: Billy Zha <[email protected]>
  • Loading branch information
qweeah authored Oct 20, 2022
1 parent ea07768 commit b5e2f98
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmd/oras/discover.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,11 @@ func runDiscover(opts discoverOptions) error {
return printDiscoveredReferrersJSON(desc, refs)
}

fmt.Println("Discovered", len(refs), "artifacts referencing", repo.Reference)
if n := len(refs); n > 1 {
fmt.Println("Discovered", n, "artifacts referencing", repo.Reference)
} else {
fmt.Println("Discovered", n, "artifact referencing", repo.Reference)
}
fmt.Println("Digest:", desc.Digest)
if len(refs) > 0 {
fmt.Println()
Expand Down

0 comments on commit b5e2f98

Please sign in to comment.