MCPcopy Index your code
hub / github.com/dagger/dagger / GetArg

Method GetArg

cmd/dagger/module_inspect.go:1058–1065  ·  view source on GitHub ↗

GetArg returns the argument definition corresponding to the given name.

(name string)

Source from the content-addressed store, hash-verified

1056
1057// GetArg returns the argument definition corresponding to the given name.
1058func (f *modFunction) GetArg(name string) (*modFunctionArg, error) {
1059 for _, a := range f.Args {
1060 if a.FlagName() == name {
1061 return a, nil
1062 }
1063 }
1064 return nil, fmt.Errorf("no argument %q in function %q", name, f.CmdName())
1065}
1066
1067func (f *modFunction) HasRequiredArgs() bool {
1068 for _, arg := range f.Args {

Callers 1

parseArgumentValuesMethod · 0.80

Calls 2

CmdNameMethod · 0.95
FlagNameMethod · 0.80

Tested by

no test coverage detected