(ctx context.Context, dict map[string]any, opts *Options, tracker *cycleTracker, post PostProcessor)
| 28 | ) |
| 29 | |
| 30 | func ApplyExtends(ctx context.Context, dict map[string]any, opts *Options, tracker *cycleTracker, post PostProcessor) error { |
| 31 | a, ok := dict["services"] |
| 32 | if !ok { |
| 33 | return nil |
| 34 | } |
| 35 | services, ok := a.(map[string]any) |
| 36 | if !ok { |
| 37 | return fmt.Errorf("services must be a mapping") |
| 38 | } |
| 39 | for name := range services { |
| 40 | merged, err := applyServiceExtends(ctx, name, services, opts, tracker, post) |
| 41 | if err != nil { |
| 42 | return err |
| 43 | } |
| 44 | services[name] = merged |
| 45 | } |
| 46 | dict["services"] = services |
| 47 | return nil |
| 48 | } |
| 49 | |
| 50 | func applyServiceExtends(ctx context.Context, name string, services map[string]any, opts *Options, tracker *cycleTracker, post PostProcessor) (any, error) { |
| 51 | s := services[name] |
no test coverage detected
searching dependent graphs…