WithProject creates a cobra run command from a ProjectFunc based on configured project options and selected services
(fn ProjectFunc, dockerCli command.Cli)
| 160 | |
| 161 | // WithProject creates a cobra run command from a ProjectFunc based on configured project options and selected services |
| 162 | func (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 |
| 169 | func (o *ProjectOptions) WithServices(dockerCli command.Cli, fn ProjectServicesFunc) func(cmd *cobra.Command, args []string) error { |
nothing calls this directly
no test coverage detected