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)
| 32 | // line on stdout whose status is status, such as "created", with an empty |
| 33 | // reason. |
| 34 | func 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 |