(content string)
| 318 | } |
| 319 | |
| 320 | func notificationOutputToTarget(content string) { |
| 321 | if notificationOutput != "" { |
| 322 | if err := os.WriteFile(notificationOutput, []byte(content+"\n"), 0644); err != nil { |
| 323 | Error(fmt.Sprintf("Failed to write to %s: %s", notificationOutput, err)) |
| 324 | os.Exit(1) |
| 325 | } |
| 326 | Info(fmt.Sprintf("Output written to %s", notificationOutput)) |
| 327 | } else { |
| 328 | fmt.Println(content) |
| 329 | } |
| 330 | } |
no test coverage detected