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

Function listHeader

pkg/cmd/repo/list/list.go:218–233  ·  view source on GitHub ↗
(owner string, matchCount, totalMatchCount int, hasFilters bool)

Source from the content-addressed store, hash-verified

216}
217
218func listHeader(owner string, matchCount, totalMatchCount int, hasFilters bool) string {
219 if totalMatchCount == 0 {
220 if hasFilters {
221 return "No results match your search"
222 } else if owner != "" {
223 return "There are no repositories in @" + owner
224 }
225 return "No results"
226 }
227
228 var matchStr string
229 if hasFilters {
230 matchStr = " that match your search"
231 }
232 return fmt.Sprintf("Showing %d of %d repositories in @%s%s", matchCount, totalMatchCount, owner, matchStr)
233}
234
235func repoInfo(r api.Repository) string {
236 tags := []string{visibilityLabel(r)}

Callers 1

listRunFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected