MCPcopy Index your code
hub / github.com/docker/cli / outputConfig

Function outputConfig

cli/command/stack/config.go:53–70  ·  view source on GitHub ↗

outputConfig returns the merged and interpolated config file

(configFiles composetypes.ConfigDetails, skipInterpolation bool)

Source from the content-addressed store, hash-verified

51
52// outputConfig returns the merged and interpolated config file
53func outputConfig(configFiles composetypes.ConfigDetails, skipInterpolation bool) (string, error) {
54 optsFunc := func(opts *composeLoader.Options) {
55 opts.SkipInterpolation = skipInterpolation
56 }
57 config, err := composeLoader.Load(configFiles, optsFunc)
58 if err != nil {
59 return "", err
60 }
61
62 var buf bytes.Buffer
63 enc := yaml.NewEncoder(&buf)
64 enc.SetIndent(2)
65 err = enc.Encode(&config)
66 if err != nil {
67 return "", err
68 }
69 return buf.String(), nil
70}

Callers 2

newConfigCommandFunction · 0.85

Calls 1

StringMethod · 0.65

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…