MCPcopy Create free account
hub / github.com/Facets-cloud/flow / addListFlags

Function addListFlags

internal/app/list.go:31–37  ·  view source on GitHub ↗

addListFlags registers the common --format / --no-color / --no-truncate flags on fs. Slugs are never truncated — only the freeform waiting field has a default cap, which --no-truncate disables.

(fs *flag.FlagSet)

Source from the content-addressed store, hash-verified

29// flags on fs. Slugs are never truncated — only the freeform waiting field
30// has a default cap, which --no-truncate disables.
31func addListFlags(fs *flag.FlagSet) listOpts {
32 return listOpts{
33 format: fs.String("format", "table", "output format: table|json|tsv"),
34 noColor: fs.Bool("no-color", false, "disable ANSI color even when stdout is a TTY"),
35 noTruncate: fs.Bool("no-truncate", false, "do not truncate the [waiting: ...] field in table output"),
36 }
37}
38
39// waitMax returns waitingMaxRunes when truncation is enabled, 0 otherwise.
40func (o listOpts) waitMax() int {

Callers 5

listTagsCmdFunction · 0.85
listTasksCmdFunction · 0.85
listProjectsCmdFunction · 0.85
listPlaybooksCmdFunction · 0.85
listRunsCmdFunction · 0.85

Calls 1

StringMethod · 0.80

Tested by

no test coverage detected