cli: move cobra customizations into cmd/dockerd
The cli package is a leftover from when the "docker" and "dockerd" cli were both maintained in this repository; the only consumer of this is now the dockerd CLI, so we can move this code (it should not be imported by anyone). Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
3d58b43efe
commit
6a90113e68
4 changed files with 5 additions and 6 deletions
|
@ -1,4 +1,4 @@
|
|||
package cli // import "github.com/docker/docker/cli"
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
|
@ -4,7 +4,6 @@ import (
|
|||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/docker/docker/cli"
|
||||
"github.com/docker/docker/daemon/config"
|
||||
"github.com/docker/docker/dockerversion"
|
||||
"github.com/docker/docker/pkg/jsonmessage"
|
||||
|
@ -32,7 +31,7 @@ func newDaemonCommand() (*cobra.Command, error) {
|
|||
Short: "A self-sufficient runtime for containers.",
|
||||
SilenceUsage: true,
|
||||
SilenceErrors: true,
|
||||
Args: cli.NoArgs,
|
||||
Args: NoArgs,
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
opts.flags = cmd.Flags()
|
||||
return runDaemon(opts)
|
||||
|
@ -40,7 +39,7 @@ func newDaemonCommand() (*cobra.Command, error) {
|
|||
DisableFlagsInUseLine: true,
|
||||
Version: fmt.Sprintf("%s, build %s", dockerversion.Version, dockerversion.GitCommit),
|
||||
}
|
||||
cli.SetupRootCommand(cmd)
|
||||
SetupRootCommand(cmd)
|
||||
|
||||
flags := cmd.Flags()
|
||||
flags.BoolP("version", "v", false, "Print version information and quit")
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package cli // import "github.com/docker/docker/cli"
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
|
@ -1,4 +1,4 @@
|
|||
package cli // import "github.com/docker/docker/cli"
|
||||
package main
|
||||
|
||||
import (
|
||||
"strings"
|
Loading…
Reference in a new issue