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

Method WithProject

cmd/compose/compose.go:162–166  ·  view source on GitHub ↗

WithProject creates a cobra run command from a ProjectFunc based on configured project options and selected services

(fn ProjectFunc, dockerCli command.Cli)

Source from the content-addressed store, hash-verified

160
161// WithProject creates a cobra run command from a ProjectFunc based on configured project options and selected services
162func (o *ProjectOptions) WithProject(fn ProjectFunc, dockerCli command.Cli) func(cmd *cobra.Command, args []string) error {
163 return o.WithServices(dockerCli, func(ctx context.Context, project *types.Project, services []string) error {
164 return fn(ctx, project)
165 })
166}
167
168// WithServices creates a cobra run command from a ProjectFunc based on configured project options and selected services
169func (o *ProjectOptions) WithServices(dockerCli command.Cli, fn ProjectServicesFunc) func(cmd *cobra.Command, args []string) error {

Callers

nothing calls this directly

Calls 1

WithServicesMethod · 0.95

Tested by

no test coverage detected