(content string)
| 833 | } |
| 834 | |
| 835 | func outputToTarget(content string) { |
| 836 | if monitorOutput != "" { |
| 837 | if err := os.WriteFile(monitorOutput, []byte(content+"\n"), 0644); err != nil { |
| 838 | Error(fmt.Sprintf("Failed to write to %s: %s", monitorOutput, err)) |
| 839 | os.Exit(1) |
| 840 | } |
| 841 | Info(fmt.Sprintf("Output written to %s", monitorOutput)) |
| 842 | } else { |
| 843 | fmt.Println(content) |
| 844 | } |
| 845 | } |
no test coverage detected