Move api/client -> cli/command

Using
  gomvpkg
     -from github.com/docker/docker/api/client
     -to github.com/docker/docker/cli/command
     -vcs_mv_cmd 'git mv {{.Src}} {{.Dst}}'

Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
Daniel Nephin 2016-09-08 13:11:39 -04:00
parent ad96b991e9
commit b2c77abc35
2 changed files with 7 additions and 7 deletions

View File

@ -5,9 +5,9 @@ import (
"os" "os"
"github.com/Sirupsen/logrus" "github.com/Sirupsen/logrus"
"github.com/docker/docker/api/client"
"github.com/docker/docker/api/client/command"
"github.com/docker/docker/cli" "github.com/docker/docker/cli"
"github.com/docker/docker/cli/command"
"github.com/docker/docker/cli/command/commands"
cliflags "github.com/docker/docker/cli/flags" cliflags "github.com/docker/docker/cli/flags"
"github.com/docker/docker/cliconfig" "github.com/docker/docker/cliconfig"
"github.com/docker/docker/dockerversion" "github.com/docker/docker/dockerversion"
@ -17,7 +17,7 @@ import (
"github.com/spf13/pflag" "github.com/spf13/pflag"
) )
func newDockerCommand(dockerCli *client.DockerCli) *cobra.Command { func newDockerCommand(dockerCli *command.DockerCli) *cobra.Command {
opts := cliflags.NewClientOptions() opts := cliflags.NewClientOptions()
var flags *pflag.FlagSet var flags *pflag.FlagSet
@ -52,7 +52,7 @@ func newDockerCommand(dockerCli *client.DockerCli) *cobra.Command {
cmd.SetOutput(dockerCli.Out()) cmd.SetOutput(dockerCli.Out())
cmd.AddCommand(newDaemonCommand()) cmd.AddCommand(newDaemonCommand())
command.AddCommands(cmd, dockerCli) commands.AddCommands(cmd, dockerCli)
return cmd return cmd
} }
@ -70,7 +70,7 @@ func main() {
stdin, stdout, stderr := term.StdStreams() stdin, stdout, stderr := term.StdStreams()
logrus.SetOutput(stderr) logrus.SetOutput(stderr)
dockerCli := client.NewDockerCli(stdin, stdout, stderr) dockerCli := command.NewDockerCli(stdin, stdout, stderr)
cmd := newDockerCommand(dockerCli) cmd := newDockerCommand(dockerCli)
if err := cmd.Execute(); err != nil { if err := cmd.Execute(); err != nil {

View File

@ -7,13 +7,13 @@ import (
"github.com/Sirupsen/logrus" "github.com/Sirupsen/logrus"
"github.com/docker/docker/utils" "github.com/docker/docker/utils"
"github.com/docker/docker/api/client" "github.com/docker/docker/cli/command"
) )
func TestClientDebugEnabled(t *testing.T) { func TestClientDebugEnabled(t *testing.T) {
defer utils.DisableDebug() defer utils.DisableDebug()
cmd := newDockerCommand(&client.DockerCli{}) cmd := newDockerCommand(&command.DockerCli{})
cmd.Flags().Set("debug", "true") cmd.Flags().Set("debug", "true")
if err := cmd.PersistentPreRunE(cmd, []string{}); err != nil { if err := cmd.PersistentPreRunE(cmd, []string{}); err != nil {