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

Function loadConfigFile

cli/command/stack/loader.go:158–180  ·  view source on GitHub ↗
(filename string, stdin io.Reader)

Source from the content-addressed store, hash-verified

156}
157
158func loadConfigFile(filename string, stdin io.Reader) (*composetypes.ConfigFile, error) {
159 var bytes []byte
160 var err error
161
162 if filename == "-" {
163 bytes, err = io.ReadAll(stdin)
164 } else {
165 bytes, err = os.ReadFile(filename)
166 }
167 if err != nil {
168 return nil, err
169 }
170
171 config, err := loader.ParseYAML(bytes)
172 if err != nil {
173 return nil, err
174 }
175
176 return &composetypes.ConfigFile{
177 Filename: filename,
178 Config: config,
179 }, nil
180}

Callers 1

loadConfigFilesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…