MCPcopy Create free account
hub / github.com/Chat2AnyLLM/code-agent-manager / New

Function New

internal/cli/app.go:31–45  ·  view source on GitHub ↗

New constructs an App from Options.

(opts Options)

Source from the content-addressed store, hash-verified

29
30// New constructs an App from Options.
31func New(opts Options) *App {
32 if opts.Version == "" {
33 opts.Version = "dev"
34 }
35 if opts.Stdout == nil {
36 opts.Stdout = os.Stdout
37 }
38 if opts.Stderr == nil {
39 opts.Stderr = os.Stderr
40 }
41 if opts.Stdin == nil {
42 opts.Stdin = os.Stdin
43 }
44 return &App{version: opts.Version, stdout: opts.Stdout, stderr: opts.Stderr, stdin: opts.Stdin}
45}
46
47// Run executes the CLI and returns the process exit code. errEndpointsHandled
48// from PersistentPreRunE is translated to a successful exit so the global

Callers 3

executeFunction · 0.92
mainFunction · 0.92
mainFunction · 0.92

Calls

no outgoing calls

Tested by 1

executeFunction · 0.74