mirror of
https://github.com/docker/compose.git
synced 2025-07-23 13:45:00 +02:00
Code formatting
Just moving it up to make clearer Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
This commit is contained in:
parent
86c925fbd3
commit
0b4cb85c84
@ -294,7 +294,7 @@ func RootCommand(dockerCli command.Cli, backend api.Service) *cobra.Command {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reset DockerCli and APIClient to get possible `DOCKER_HOST` and/or `DOCKER_CONTEXT` loaded from environment file
|
// Reset DockerCli and APIClient to get possible `DOCKER_HOST` and/or `DOCKER_CONTEXT` loaded from environment file.
|
||||||
err = dockerCli.Apply(func(cli *command.DockerCli) error {
|
err = dockerCli.Apply(func(cli *command.DockerCli) error {
|
||||||
return cli.Initialize(flags.NewClientOptions(),
|
return cli.Initialize(flags.NewClientOptions(),
|
||||||
command.WithInitializeClient(func(_ *command.DockerCli) (client.APIClient, error) {
|
command.WithInitializeClient(func(_ *command.DockerCli) (client.APIClient, error) {
|
||||||
|
@ -22,6 +22,8 @@ import (
|
|||||||
"github.com/compose-spec/compose-go/types"
|
"github.com/compose-spec/compose-go/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var _ Service = &ServiceProxy{}
|
||||||
|
|
||||||
// ServiceProxy implements Service by delegating to implementation functions. This allows lazy init and per-method overrides
|
// ServiceProxy implements Service by delegating to implementation functions. This allows lazy init and per-method overrides
|
||||||
type ServiceProxy struct {
|
type ServiceProxy struct {
|
||||||
BuildFn func(ctx context.Context, project *types.Project, options BuildOptions) error
|
BuildFn func(ctx context.Context, project *types.Project, options BuildOptions) error
|
||||||
@ -59,8 +61,6 @@ func NewServiceProxy() *ServiceProxy {
|
|||||||
// Interceptor allow to customize the compose types.Project before the actual Service method is executed
|
// Interceptor allow to customize the compose types.Project before the actual Service method is executed
|
||||||
type Interceptor func(ctx context.Context, project *types.Project)
|
type Interceptor func(ctx context.Context, project *types.Project)
|
||||||
|
|
||||||
var _ Service = &ServiceProxy{}
|
|
||||||
|
|
||||||
// WithService configure proxy to use specified Service as delegate
|
// WithService configure proxy to use specified Service as delegate
|
||||||
func (s *ServiceProxy) WithService(service Service) *ServiceProxy {
|
func (s *ServiceProxy) WithService(service Service) *ServiceProxy {
|
||||||
s.BuildFn = service.Build
|
s.BuildFn = service.Build
|
||||||
|
Loading…
x
Reference in New Issue
Block a user