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"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/docker/docker/cli/cobraadaptor"
|
"github.com/docker/docker/api/client"
|
||||||
cliflags "github.com/docker/docker/cli/flags"
|
"github.com/docker/docker/api/client/command"
|
||||||
|
"github.com/docker/docker/pkg/term"
|
||||||
|
"github.com/spf13/cobra"
|
||||||
"github.com/spf13/cobra/doc"
|
"github.com/spf13/cobra/doc"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -15,10 +17,12 @@ func generateManPages(path string) error {
|
||||||
Section: "1",
|
Section: "1",
|
||||||
Source: "Docker Community",
|
Source: "Docker Community",
|
||||||
}
|
}
|
||||||
flags := &cliflags.ClientFlags{
|
|
||||||
Common: cliflags.InitCommonFlags(),
|
stdin, stdout, stderr := term.StdStreams()
|
||||||
}
|
dockerCli := client.NewDockerCli(stdin, stdout, stderr)
|
||||||
cmd := cobraadaptor.NewCobraAdaptor(flags).GetRootCommand()
|
cmd := &cobra.Command{Use: "docker"}
|
||||||
|
command.AddCommands(cmd, dockerCli)
|
||||||
|
|
||||||
cmd.DisableAutoGenTag = true
|
cmd.DisableAutoGenTag = true
|
||||||
return doc.GenManTreeFromOpts(cmd, doc.GenManTreeOptions{
|
return doc.GenManTreeFromOpts(cmd, doc.GenManTreeOptions{
|
||||||
Header: header,
|
Header: header,
|
||||||
|
|
Loading…
Reference in New Issue