MCPcopy Create free account
hub / github.com/openclaw/gogcli / ExitCode

Function ExitCode

internal/cmd/exit.go:24–36  ·  view source on GitHub ↗
(err error)

Source from the content-addressed store, hash-verified

22}
23
24func ExitCode(err error) int {
25 if err == nil {
26 return 0
27 }
28 var ee *ExitError
29 if errors.As(err, &ee) && ee != nil {
30 if ee.Code < 0 {
31 return 1
32 }
33 return ee.Code
34 }
35 return 1
36}

Calls

no outgoing calls