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

Function listHeader

pkg/cmd/discussion/list/list.go:305–314  ·  view source on GitHub ↗
(repoName string, count, total int, state string)

Source from the content-addressed store, hash-verified

303}
304
305func listHeader(repoName string, count, total int, state string) string {
306 switch state {
307 case stateOpen:
308 return fmt.Sprintf("Showing %d of %d open discussions in %s", count, total, repoName)
309 case stateClosed:
310 return fmt.Sprintf("Showing %d of %d closed discussions in %s", count, total, repoName)
311 default:
312 return fmt.Sprintf("Showing %d of %d discussions in %s", count, total, repoName)
313 }
314}
315
316func printDiscussions(opts *ListOptions, repoName string, discussions []client.Discussion, totalCount int) {
317 isTerminal := opts.IO.IsStdoutTTY()

Callers 1

printDiscussionsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected