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

Function notificationOutputToTarget

cmd/notification.go:320–330  ·  view source on GitHub ↗
(content string)

Source from the content-addressed store, hash-verified

318}
319
320func 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}

Callers 1

notification.goFile · 0.85

Calls 2

ErrorFunction · 0.85
InfoFunction · 0.85

Tested by

no test coverage detected