LoadServices produces a ServiceConfig map from a compose file Dict the servicesDict is not validated if directly used. Use Load() to enable validation
(servicesDict map[string]any, workingDir string, lookupEnv template.Mapping)
| 393 | // LoadServices produces a ServiceConfig map from a compose file Dict |
| 394 | // the servicesDict is not validated if directly used. Use Load() to enable validation |
| 395 | func LoadServices(servicesDict map[string]any, workingDir string, lookupEnv template.Mapping) ([]types.ServiceConfig, error) { |
| 396 | services := make([]types.ServiceConfig, 0, len(servicesDict)) |
| 397 | |
| 398 | for name, serviceDef := range servicesDict { |
| 399 | serviceConfig, err := LoadService(name, serviceDef.(map[string]any), workingDir, lookupEnv) |
| 400 | if err != nil { |
| 401 | return nil, err |
| 402 | } |
| 403 | services = append(services, *serviceConfig) |
| 404 | } |
| 405 | |
| 406 | return services, nil |
| 407 | } |
| 408 | |
| 409 | // LoadService produces a single ServiceConfig from a compose file Dict |
| 410 | // the serviceDict is not validated if directly used. Use Load() to enable validation |
no test coverage detected
searching dependent graphs…