From f40e2e6e61779b45d287f2624cb7277dcec7d80f Mon Sep 17 00:00:00 2001 From: Robert Kroeger Date: Sun, 6 Jul 2014 08:11:28 -0700 Subject: [PATCH] Clarified use of camtool googinit To avoid user confusion, force camtool googinit use to actually specify if Google Cloud Storage or Google Drive auth setup is desired. Change-Id: I6541b4a589de2dda73b725fcaf7bcdadd3f60b65 --- cmd/camtool/googinit.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/camtool/googinit.go b/cmd/camtool/googinit.go index 6009d7c9d..77b15602d 100644 --- a/cmd/camtool/googinit.go +++ b/cmd/camtool/googinit.go @@ -36,7 +36,7 @@ type googinitCmd struct { func init() { cmdmain.RegisterCommand("googinit", func(flags *flag.FlagSet) cmdmain.CommandRunner { cmd := new(googinitCmd) - flags.StringVar(&cmd.storageType, "type", "drive", "Storage type: drive or cloud") + flags.StringVar(&cmd.storageType, "type", "", "Storage type: drive or cloud") return cmd }) } @@ -58,7 +58,7 @@ func (c *googinitCmd) RunCommand(args []string) error { ) if c.storageType != "drive" && c.storageType != "cloud" { - return cmdmain.UsageError("Invalid storage type.") + return cmdmain.UsageError("Invalid storage type: must be drive for Google Drive or cloud for Google Cloud Storage.") } if clientId, clientSecret, err = getClientInfo(); err != nil {