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:
Vincent Demeester 2019-01-28 15:39:34 +01:00 коммит произвёл GitHub
Родитель da2b4a4339 22ad637367
Коммит 36c00b3c92
1 изменённых файлов: 4 добавлений и 3 удалений

Просмотреть файл

@ -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)