MCPcopy Create free account
hub / github.com/cli/cli / listHeader

Function listHeader

pkg/cmd/issue/artifact/list/list.go:163–172  ·  view source on GitHub ↗

listHeader counts the artifacts shown. Without a total count from the API, it can't say how many there are in all.

(issueRef string, count int, filtered bool)

Source from the content-addressed store, hash-verified

161// listHeader counts the artifacts shown. Without a total count from the API,
162// it can't say how many there are in all.
163func listHeader(issueRef string, count int, filtered bool) string {
164 header := fmt.Sprintf("Showing %s on %s", text.Pluralize(count, "artifact"), issueRef)
165 if !filtered {
166 return header
167 }
168 if count == 1 {
169 return header + " that matches your search"
170 }
171 return header + " that match your search"
172}
173
174func printArtifacts(ios *iostreams.IOStreams, now time.Time, artifacts []client.Artifact) error {
175 cs := ios.ColorScheme()

Callers 1

listRunFunction · 0.70

Calls 1

PluralizeFunction · 0.92

Tested by

no test coverage detected