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:
Daniel Nephin 2016-06-23 11:25:51 -04:00 committed by Tibor Vass
parent 7225cc5604
commit 6e33dc2d91
1 changed files with 10 additions and 6 deletions

View File

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