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

Function fileObjectConfig

cli/compose/convert/compose.go:184–203  ·  view source on GitHub ↗
(namespace Namespace, name string, obj composetypes.FileObjectConfig)

Source from the content-addressed store, hash-verified

182}
183
184func fileObjectConfig(namespace Namespace, name string, obj composetypes.FileObjectConfig) (swarmFileObject, error) {
185 data, err := os.ReadFile(obj.File)
186 if err != nil {
187 return swarmFileObject{}, err
188 }
189
190 if obj.Name != "" {
191 name = obj.Name
192 } else {
193 name = namespace.Scope(name)
194 }
195
196 return swarmFileObject{
197 Annotations: swarm.Annotations{
198 Name: name,
199 Labels: addStackLabel(namespace, obj.Labels),
200 },
201 Data: data,
202 }, nil
203}

Callers 2

SecretsFunction · 0.85
ConfigsFunction · 0.85

Calls 2

addStackLabelFunction · 0.85
ScopeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…