MCPcopy
hub / github.com/cli/cli / listHeader

Function listHeader

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

Source from the content-addressed store, hash-verified

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

Callers 1

listRunFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected