mirror of
https://github.com/jesseduffield/lazydocker.git
synced 2026-07-25 08:31:03 +00:00
commands: pass arguments inline
newer Docker releases has Opt struct instead of this func
This commit is contained in:
parent
724d501115
commit
450d163040
1 changed files with 1 additions and 6 deletions
|
|
@ -68,12 +68,7 @@ func (c *DockerCommand) NewCommandObject(obj CommandObject) CommandObject {
|
||||||
|
|
||||||
// NewDockerCommand it runs docker commands
|
// NewDockerCommand it runs docker commands
|
||||||
func NewDockerCommand(log *logrus.Entry, osCommand *OSCommand, tr *i18n.TranslationSet, config *config.AppConfig, errorChan chan error) (*DockerCommand, error) {
|
func NewDockerCommand(log *logrus.Entry, osCommand *OSCommand, tr *i18n.TranslationSet, config *config.AppConfig, errorChan chan error) (*DockerCommand, error) {
|
||||||
opts := []func(*client.Client) error{
|
cli, err := client.NewClientWithOpts(client.FromEnv, client.WithVersion(APIVersion))
|
||||||
client.WithVersion(APIVersion),
|
|
||||||
client.FromEnv,
|
|
||||||
}
|
|
||||||
|
|
||||||
cli, err := client.NewClientWithOpts(opts...)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue