(content string)
| 424 | } |
| 425 | |
| 426 | func outputGroupToTarget(content string) { |
| 427 | if groupOutput != "" { |
| 428 | if err := os.WriteFile(groupOutput, []byte(content+"\n"), 0644); err != nil { |
| 429 | Error(fmt.Sprintf("Failed to write to file: %s", err)) |
| 430 | os.Exit(1) |
| 431 | } |
| 432 | Info(fmt.Sprintf("Output written to %s", groupOutput)) |
| 433 | } else { |
| 434 | fmt.Println(content) |
| 435 | } |
| 436 | } |