MCPcopy
hub / github.com/dagger/dagger / BuiltinCommand

Method BuiltinCommand

cmd/dagger/shell_commands.go:164–174  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

162}
163
164func (h *shellCallHandler) BuiltinCommand(name string) (*ShellCommand, error) {
165 if name == "." || !strings.HasPrefix(name, ".") || strings.Contains(name, "/") {
166 return nil, nil
167 }
168 for _, c := range h.builtins {
169 if c.Name() == name {
170 return c, nil
171 }
172 }
173 return nil, fmt.Errorf("command not found: %q", name)
174}
175
176func (h *shellCallHandler) Builtins() []*ShellCommand {
177 l := make([]*ShellCommand, 0, len(h.builtins))

Callers 4

CallMethod · 0.95
cmdMethod · 0.95
entrypointCallMethod · 0.95
registerCommandsMethod · 0.95

Calls 2

ContainsMethod · 0.65
NameMethod · 0.65

Tested by

no test coverage detected