MCPcopy
hub / github.com/dagger/dagger / constructorCall

Method constructorCall

cmd/dagger/shell_exec.go:421–432  ·  view source on GitHub ↗
(ctx context.Context, md *moduleDef, st *ShellState, args []string)

Source from the content-addressed store, hash-verified

419}
420
421func (h *shellCallHandler) constructorCall(ctx context.Context, md *moduleDef, st *ShellState, args []string) (*ShellState, error) {
422 fn := md.ModuleConstructor()
423
424 values, err := h.parseArgumentValues(ctx, md, fn, args)
425 if err != nil {
426 return nil, fmt.Errorf("%q constructor: %w", md.Name, err)
427 }
428
429 newSt := st.WithCall(fn, values)
430
431 return &newSt, nil
432}
433
434// functionCall is executed for every command that the exec handler processes
435func (h *shellCallHandler) functionCall(ctx context.Context, st *ShellState, name string, args []string) (*ShellState, error) {

Callers 1

entrypointCallMethod · 0.95

Calls 3

parseArgumentValuesMethod · 0.95
ModuleConstructorMethod · 0.80
WithCallMethod · 0.80

Tested by

no test coverage detected