Convert docker root command to use pflag and cobra

Fix the daemon proxy for cobra commands.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
Daniel Nephin
2016-06-22 13:08:04 -04:00
parent d08dd40a88
commit 82a8cc1556
2 changed files with 14 additions and 68 deletions

View File

@ -1,14 +1,13 @@
package flags
import (
"github.com/spf13/pflag"
)
// ClientFlags represents flags for the docker client.
type ClientFlags struct {
FlagSet *pflag.FlagSet
// ClientOptions are the options used to configure the client cli
type ClientOptions struct {
Common *CommonOptions
PostParse func()
ConfigDir string
Version bool
}
// NewClientOptions returns a new ClientOptions
func NewClientOptions() *ClientOptions {
return &ClientOptions{Common: NewCommonOptions()}
}