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

Function environmentOutputToTarget

cmd/environment.go:298–308  ·  view source on GitHub ↗
(content string)

Source from the content-addressed store, hash-verified

296}
297
298func environmentOutputToTarget(content string) {
299 if environmentOutput != "" {
300 if err := os.WriteFile(environmentOutput, []byte(content+"\n"), 0644); err != nil {
301 Error(fmt.Sprintf("Failed to write to %s: %s", environmentOutput, err))
302 os.Exit(1)
303 }
304 Info(fmt.Sprintf("Output written to %s", environmentOutput))
305 } else {
306 fmt.Println(content)
307 }
308}

Callers 1

environment.goFile · 0.85

Calls 2

ErrorFunction · 0.85
InfoFunction · 0.85

Tested by

no test coverage detected