(content string)
| 398 | } |
| 399 | |
| 400 | func maintenanceOutputToTarget(content string) { |
| 401 | if maintenanceOutput != "" { |
| 402 | if err := os.WriteFile(maintenanceOutput, []byte(content+"\n"), 0644); err != nil { |
| 403 | Error(fmt.Sprintf("Failed to write to %s: %s", maintenanceOutput, err)) |
| 404 | os.Exit(1) |
| 405 | } |
| 406 | Info(fmt.Sprintf("Output written to %s", maintenanceOutput)) |
| 407 | } else { |
| 408 | fmt.Println(content) |
| 409 | } |
| 410 | } |
no test coverage detected