(content string)
| 625 | } |
| 626 | |
| 627 | func siteOutputToTarget(content string) { |
| 628 | if siteOutput != "" { |
| 629 | if err := os.WriteFile(siteOutput, []byte(content+"\n"), 0644); err != nil { |
| 630 | Error(fmt.Sprintf("Failed to write to %s: %s", siteOutput, err)) |
| 631 | os.Exit(1) |
| 632 | } |
| 633 | Info(fmt.Sprintf("Output written to %s", siteOutput)) |
| 634 | } else { |
| 635 | fmt.Println(content) |
| 636 | } |
| 637 | } |
| 638 | |
| 639 | func splitAndTrimSite(s string) []string { |
| 640 | parts := strings.Split(s, ",") |
no test coverage detected