mirror of https://github.com/docker/cli.git
Remove old cli framework.
Also consolidate the leftover packages under cli. Remove pkg/mflag. Make manpage generation work with new cobra layout. Remove remaining mflag and fix tests after rebase with master. Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
parent
7225cc5604
commit
6e33dc2d91
|
@ -4,8 +4,10 @@ import (
|
|||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/docker/docker/cli/cobraadaptor"
|
||||
cliflags "github.com/docker/docker/cli/flags"
|
||||
"github.com/docker/docker/api/client"
|
||||
"github.com/docker/docker/api/client/command"
|
||||
"github.com/docker/docker/pkg/term"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/cobra/doc"
|
||||
)
|
||||
|
||||
|
@ -15,10 +17,12 @@ func generateManPages(path string) error {
|
|||
Section: "1",
|
||||
Source: "Docker Community",
|
||||
}
|
||||
flags := &cliflags.ClientFlags{
|
||||
Common: cliflags.InitCommonFlags(),
|
||||
}
|
||||
cmd := cobraadaptor.NewCobraAdaptor(flags).GetRootCommand()
|
||||
|
||||
stdin, stdout, stderr := term.StdStreams()
|
||||
dockerCli := client.NewDockerCli(stdin, stdout, stderr)
|
||||
cmd := &cobra.Command{Use: "docker"}
|
||||
command.AddCommands(cmd, dockerCli)
|
||||
|
||||
cmd.DisableAutoGenTag = true
|
||||
return doc.GenManTreeFromOpts(cmd, doc.GenManTreeOptions{
|
||||
Header: header,
|
||||
|
|
Loading…
Reference in New Issue