MCPcopy Create free account
hub / github.com/celer-pkg/celer / execute

Method execute

cmds/cmd_integrate.go:56–74  ·  view source on GitHub ↗

execute performs the main logic for integration.

()

Source from the content-addressed store, hash-verified

54
55// execute performs the main logic for integration.
56func (i *integrateCmd) execute() error {
57 shell := i.detectShell()
58
59 // Validate environment.
60 if err := i.validateEnvironment(shell); err != nil {
61 return fmt.Errorf("environment validation failed -> %w", err)
62 }
63
64 // Initialize completions.
65 if err := i.initializeCompletions(); err != nil {
66 return fmt.Errorf("failed to initialize completion handlers -> %w", err)
67 }
68
69 // Execute the requested operation.
70 if i.remove {
71 return i.handleUnregister(shell)
72 }
73 return i.handleRegister(shell)
74}
75
76func (i *integrateCmd) detectShell() (shell completion.ShellType) {
77 shell = completion.NotSupported

Callers 1

CommandMethod · 0.95

Calls 5

detectShellMethod · 0.95
validateEnvironmentMethod · 0.95
initializeCompletionsMethod · 0.95
handleUnregisterMethod · 0.95
handleRegisterMethod · 0.95

Tested by

no test coverage detected