MCPcopy Create free account
hub / github.com/cronitorio/cronitor-cli / outputToTarget

Function outputToTarget

cmd/monitor.go:835–845  ·  view source on GitHub ↗
(content string)

Source from the content-addressed store, hash-verified

833}
834
835func 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}

Callers 1

monitor.goFile · 0.85

Calls 2

ErrorFunction · 0.85
InfoFunction · 0.85

Tested by

no test coverage detected