MCPcopy
hub / github.com/puma/puma-dev / execWithExitStatus

Function execWithExitStatus

cmd/puma-dev/main.go:39–57  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

37}
38
39func execWithExitStatus() CommandResult {
40 if *fVersion {
41 fmt.Printf("Version: %s (%s)\n", Version, runtime.Version())
42 return EarlyExitClean
43 }
44
45 if flag.NArg() > 0 {
46 err := command()
47
48 if err != nil {
49 fmt.Printf("Error: %s\n", err)
50 return EarlyExitError
51 }
52
53 return EarlyExitClean
54 }
55
56 return Continue
57}
58
59func init() {
60 flag.Usage = func() {

Calls 1

commandFunction · 0.85