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

Function PrintSuccess

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

PrintSuccess prints the line for an artifact the command acted on. In a terminal, the line is icon and message on stdout. Otherwise it is a piped line on stdout whose status is status, such as "created", with an empty reason.

(ios *iostreams.IOStreams, status string, r Result, icon, message string)

Source from the content-addressed store, hash-verified

32// line on stdout whose status is status, such as "created", with an empty
33// reason.
34func PrintSuccess(ios *iostreams.IOStreams, status string, r Result, icon, message string) {
35 if !ios.IsStdoutTTY() {
36 printResultLine(ios.Out, status, r, "")
37 return
38 }
39 fmt.Fprintf(ios.Out, "%s %s\n", icon, message)
40}
41
42// PrintSkip prints the line for an artifact the command left alone as asked,
43// such as a download whose file already exists with --skip-existing. A skip

Callers 5

createRunFunction · 0.92
downloadArtifactFunction · 0.92
editRunFunction · 0.92
restoreVersionFunction · 0.92
TestPrintSuccessFunction · 0.85

Calls 2

printResultLineFunction · 0.85
IsStdoutTTYMethod · 0.80

Tested by 1

TestPrintSuccessFunction · 0.68