From 7d1c223c01e2f9b27122b90e6a07e707b788a2f8 Mon Sep 17 00:00:00 2001 From: David Calavera Date: Sat, 17 Aug 2013 22:28:05 -0700 Subject: [PATCH] Use flag.StringVar to capture the command line flags. Upstream-commit: 9f8e5a93b4b7c6b190177c73085e7d2d2d93c64b Component: engine --- components/engine/commands.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/components/engine/commands.go b/components/engine/commands.go index 3dbcc41cf6..be2a4c02d4 100644 --- a/components/engine/commands.go +++ b/components/engine/commands.go @@ -254,9 +254,11 @@ func (cli *DockerCli) CmdBuild(args ...string) error { func (cli *DockerCli) CmdLogin(args ...string) error { cmd := Subcmd("login", "[OPTIONS]", "Register or Login to the docker registry server") - username := *cmd.String("u", "", "username") - password := *cmd.String("p", "", "password") - email := *cmd.String("e", "", "email") + var username, password, email string + + cmd.StringVar(&username, "u", "", "username") + cmd.StringVar(&password, "p", "", "password") + cmd.StringVar(&email, "e", "", "email") err := cmd.Parse(args) if err != nil {