MCPcopy Create free account
hub / github.com/compose-spec/compose-go / transformExtends

Function transformExtends

transform/extends.go:25–36  ·  view source on GitHub ↗
(data any, p tree.Path, ignoreParseError bool)

Source from the content-addressed store, hash-verified

23)
24
25func transformExtends(data any, p tree.Path, ignoreParseError bool) (any, error) {
26 switch v := data.(type) {
27 case map[string]any:
28 return transformMapping(v, p, ignoreParseError)
29 case string:
30 return map[string]any{
31 "service": v,
32 }, nil
33 default:
34 return data, fmt.Errorf("%s: invalid type %T for extends", p, v)
35 }
36}

Callers

nothing calls this directly

Calls 1

transformMappingFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…