MCPcopy
hub / github.com/docker/compose / checkSelectedServices

Function checkSelectedServices

pkg/compose/down.go:127–142  ·  view source on GitHub ↗
(options api.DownOptions, project *types.Project)

Source from the content-addressed store, hash-verified

125}
126
127func checkSelectedServices(options api.DownOptions, project *types.Project) ([]string, error) {
128 var services []string
129 for _, service := range options.Services {
130 _, err := project.GetService(service)
131 if err != nil {
132 if options.Project != nil {
133 // ran with an explicit compose.yaml file, so we should not ignore
134 return nil, err
135 }
136 // ran without an explicit compose.yaml file, so can't distinguish typo vs container already removed
137 } else {
138 services = append(services, service)
139 }
140 }
141 return services, nil
142}
143
144func (s *composeService) ensureVolumesDown(ctx context.Context, project *types.Project) []downOp {
145 var ops []downOp

Callers 1

downMethod · 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…