Skip to content

Commit

Permalink
commands: pass arguments inline
Browse files Browse the repository at this point in the history
newer Docker releases has Opt struct instead of this func
  • Loading branch information
dawidd6 committed Nov 16, 2019
1 parent 724d501 commit 450d163
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions pkg/commands/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,7 @@ func (c *DockerCommand) NewCommandObject(obj CommandObject) CommandObject {

// NewDockerCommand it runs docker commands
func NewDockerCommand(log *logrus.Entry, osCommand *OSCommand, tr *i18n.TranslationSet, config *config.AppConfig, errorChan chan error) (*DockerCommand, error) {
opts := []func(*client.Client) error{
client.WithVersion(APIVersion),
client.FromEnv,
}

cli, err := client.NewClientWithOpts(opts...)
cli, err := client.NewClientWithOpts(client.FromEnv, client.WithVersion(APIVersion))
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 450d163

Please sign in to comment.