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

Function fatal

cmd/root.go:416–426  ·  view source on GitHub ↗
(msg string, exitCode int)

Source from the content-addressed store, hash-verified

414}
415
416func fatal(msg string, exitCode int) {
417 debugLog := viper.GetString(varLog)
418 if len(debugLog) > 0 {
419 f, _ := os.OpenFile(debugLog, os.O_APPEND|os.O_WRONLY|os.O_CREATE, 0644)
420 defer f.Close()
421 f.WriteString(msg + "\n")
422 }
423
424 fmt.Fprintln(os.Stderr, msg)
425 os.Exit(exitCode)
426}
427
428func makeStamp() float64 {
429 return float64(time.Now().UnixNano()) / float64(time.Second)

Callers 9

status.goFile · 0.85
runUpdateFunction · 0.85
ExecuteFunction · 0.85
discover.goFile · 0.85
importMonitorsFromFileFunction · 0.85
processCrontabFunction · 0.85
dash.goFile · 0.85
runMCPServerFunction · 0.85

Calls 1

CloseMethod · 0.80

Tested by

no test coverage detected