MCPcopy Index your code
hub / github.com/cloudquery/cloudquery / main

Function main

cli/main.go:47–67  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

45}
46
47func main() {
48 exitCode := 0
49 defer func() {
50 err := recover()
51 if err != nil {
52 originalMessage := fmt.Sprintf("panic: %v\n\n%s", err, string(debug.Stack()))
53 sentry.CurrentHub().CaptureMessage(originalMessage)
54 panic(err)
55 }
56
57 os.Exit(exitCode)
58 }()
59 defer cmd.CloseLogFile()
60
61 // This ensures we don't print anything until logging is configured
62 log.Logger = log.Level(zerolog.Disabled)
63 if err := executeRootCmdWithContext(); err != nil {
64 log.Error().Err(err).Msg("exiting with error")
65 exitCode = 1
66 }
67}

Callers

nothing calls this directly

Calls 2

ErrorMethod · 0.45

Tested by

no test coverage detected