LoadModel loads compose file according to options and returns a raw (yaml tree) model
(ctx context.Context)
| 488 | |
| 489 | // LoadModel loads compose file according to options and returns a raw (yaml tree) model |
| 490 | func (o *ProjectOptions) LoadModel(ctx context.Context) (map[string]any, error) { |
| 491 | configDetails, err := o.prepare(ctx) |
| 492 | if err != nil { |
| 493 | return nil, err |
| 494 | } |
| 495 | |
| 496 | return loader.LoadModelWithContext(ctx, *configDetails, o.loadOptions...) |
| 497 | } |
| 498 | |
| 499 | // prepare converts ProjectOptions into loader's types.ConfigDetails and configures default load options |
| 500 | func (o *ProjectOptions) prepare(ctx context.Context) (*types.ConfigDetails, error) { |
no test coverage detected