Merge pull request #1633 from silvin-lubecki/refactor-docker-cli-construction
Introduce functional arguments to NewDockerCli for a more stable API.
This commit is contained in:
Коммит
36c00b3c92
|
@ -11,7 +11,6 @@ import (
|
|||
|
||||
"github.com/docker/cli/cli/command"
|
||||
"github.com/docker/cli/cli/command/commands"
|
||||
"github.com/docker/docker/pkg/term"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/cobra/doc"
|
||||
"github.com/spf13/pflag"
|
||||
|
@ -37,8 +36,10 @@ func generateManPages(opts *options) error {
|
|||
header.Date = &now
|
||||
}
|
||||
|
||||
stdin, stdout, stderr := term.StdStreams()
|
||||
dockerCli := command.NewDockerCli(stdin, stdout, stderr, false, nil)
|
||||
dockerCli, err := command.NewDockerCli()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
cmd := &cobra.Command{Use: "docker"}
|
||||
commands.AddCommands(cmd, dockerCli)
|
||||
source := filepath.Join(opts.source, descriptionSourcePath)
|
||||
|
|
Загрузка…
Ссылка в новой задаче