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

Function PrintSkip

pkg/cmd/issue/artifact/shared/results.go:47–53  ·  view source on GitHub ↗

PrintSkip prints the line for an artifact the command left alone as asked, such as a download whose file already exists with --skip-existing. A skip isn't a failure, so in a terminal it goes to stdout with the successes, reading "- Skipped : " with a muted dash. Otherwise it is a pi

(ios *iostreams.IOStreams, r Result, subject, reason string)

Source from the content-addressed store, hash-verified

45// reading "- Skipped <subject>: <reason>" with a muted dash. Otherwise it is a
46// piped line on stdout whose status is "skipped".
47func PrintSkip(ios *iostreams.IOStreams, r Result, subject, reason string) {
48 if !ios.IsStdoutTTY() {
49 printResultLine(ios.Out, "skipped", r, reason)
50 return
51 }
52 fmt.Fprintf(ios.Out, "%s Skipped %s: %s\n", ios.ColorScheme().Muted("-"), subject, reason)
53}
54
55// PrintUnchanged prints the line for an artifact the command didn't change
56// because it already was as asked, such as an artifact that already matches

Callers 2

downloadArtifactFunction · 0.92
TestPrintSkipFunction · 0.85

Calls 4

printResultLineFunction · 0.85
IsStdoutTTYMethod · 0.80
MutedMethod · 0.80
ColorSchemeMethod · 0.80

Tested by 1

TestPrintSkipFunction · 0.68