(content string)
| 560 | } |
| 561 | |
| 562 | func issueOutputToTarget(content string) { |
| 563 | if issueOutput != "" { |
| 564 | if err := os.WriteFile(issueOutput, []byte(content+"\n"), 0644); err != nil { |
| 565 | Error(fmt.Sprintf("Failed to write to %s: %s", issueOutput, err)) |
| 566 | os.Exit(1) |
| 567 | } |
| 568 | Info(fmt.Sprintf("Output written to %s", issueOutput)) |
| 569 | } else { |
| 570 | fmt.Println(content) |
| 571 | } |
| 572 | } |