MCPcopy Create free account
hub / github.com/dagger/dagger / orderedNamedInputs

Function orderedNamedInputs

core/object.go:1302–1319  ·  view source on GitHub ↗
(specs []dagql.InputSpec, args map[string]dagql.Input)

Source from the content-addressed store, hash-verified

1300}
1301
1302func orderedNamedInputs(specs []dagql.InputSpec, args map[string]dagql.Input) []dagql.NamedInput {
1303 if len(args) == 0 {
1304 return nil
1305 }
1306
1307 inputs := make([]dagql.NamedInput, 0, len(specs))
1308 for _, spec := range specs {
1309 arg, ok := args[spec.Name]
1310 if !ok {
1311 continue
1312 }
1313 inputs = append(inputs, dagql.NamedInput{
1314 Name: spec.Name,
1315 Value: arg,
1316 })
1317 }
1318 return inputs
1319}
1320
1321func (obj *ModuleObject) fields(ctx context.Context) (fields []dagql.Field[*ModuleObject], err error) {
1322 for _, field := range obj.TypeDef.Fields {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected