From ee64a6784374e82984a266cad8fd1a5e2e371955 Mon Sep 17 00:00:00 2001 From: Johan Euphrosine Date: Sat, 7 Jun 2014 14:06:28 -0700 Subject: [PATCH] cloudcfg: var cleanup --- cmd/cloudcfg/cloudcfg.go | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/cmd/cloudcfg/cloudcfg.go b/cmd/cloudcfg/cloudcfg.go index ad4ee66ec68..29a34240b6c 100644 --- a/cmd/cloudcfg/cloudcfg.go +++ b/cmd/cloudcfg/cloudcfg.go @@ -31,14 +31,16 @@ import ( const APP_VERSION = "0.1" // The flag package provides a default help printer via -h switch -var versionFlag *bool = flag.Bool("v", false, "Print the version number.") -var httpServer *string = flag.String("h", "", "The host to connect to.") -var config *string = flag.String("c", "", "Path to the config file.") -var labelQuery *string = flag.String("l", "", "Label query to use for listing") -var updatePeriod *time.Duration = flag.Duration("u", 60*time.Second, "Update interarrival in seconds") -var portSpec *string = flag.String("p", "", "The port spec, comma-separated list of :,...") -var servicePort *int = flag.Int("s", -1, "If positive, create and run a corresponding service on this port, only used with 'run'") -var authConfig *string = flag.String("auth", os.Getenv("HOME")+"/.kubernetes_auth", "Path to the auth info file. If missing, prompt the user") +var ( + versionFlag = flag.Bool("v", false, "Print the version number.") + httpServer = flag.String("h", "", "The host to connect to.") + config = flag.String("c", "", "Path to the config file.") + labelQuery = flag.String("l", "", "Label query to use for listing") + updatePeriod = flag.Duration("u", 60*time.Second, "Update interarrival in seconds") + portSpec = flag.String("p", "", "The port spec, comma-separated list of :,...") + servicePort = flag.Int("s", -1, "If positive, create and run a corresponding service on this port, only used with 'run'") + authConfig = flag.String("auth", os.Getenv("HOME")+"/.kubernetes_auth", "Path to the auth info file. If missing, prompt the user") +) func usage() { log.Fatal("Usage: cloudcfg -h [-c config/file.json] [-p :,..., : ")