diff --git a/cmd/root.go b/cmd/root.go index 12085938d..a2d25e780 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -54,6 +54,7 @@ Build Time: ` + BuildTime + "\n", }, } rc.PersistentFlags().Bool("dry-run", false, "stop before executing") + rc.PersistentFlags().MarkHidden("dry-run") rc.PersistentFlags().StringP("config", "c", "", "Configuration file to read from.") for _, subcomFn := range subcommandFns { rc.AddCommand(subcomFn(stdin, stdout, stderr)) diff --git a/cmd/root_test.go b/cmd/root_test.go index b172301d5..b62a14bbf 100644 --- a/cmd/root_test.go +++ b/cmd/root_test.go @@ -80,7 +80,7 @@ type commandTest struct { validation func() error } -func (ct commandTest) setupCommand(t *testing.T) *cobra.Command { +func (ct *commandTest) setupCommand(t *testing.T) *cobra.Command { // make config file cfgFile, err := ioutil.TempFile("", "") failErr(t, err, "making temp file") @@ -106,7 +106,7 @@ func (ct commandTest) setupCommand(t *testing.T) *cobra.Command { return rc } -func (ct commandTest) reset() { +func (ct *commandTest) reset() { for name, _ := range ct.env { os.Setenv(name, "") } diff --git a/cmd/server.go b/cmd/server.go index 223284c21..1eb5dbb59 100644 --- a/cmd/server.go +++ b/cmd/server.go @@ -75,7 +75,7 @@ on the configured port.`, flags := serveCmd.Flags() flags.StringVarP(&Server.Config.DataDir, "data-dir", "d", "~/.pilosa", "Directory to store pilosa data files.") - flags.StringVarP(&Server.Config.Host, "bind", "", ":10101", "Default URI on which pilosa should listen.") + flags.StringVarP(&Server.Config.Host, "bind", "b", ":10101", "Default URI on which pilosa should listen.") flags.IntVarP(&Server.Config.Cluster.ReplicaN, "cluster.replicas", "", 1, "Number hosts each piece of data should be stored on.") flags.StringSliceVarP(&Server.Config.Cluster.Nodes, "cluster.hosts", "", []string{}, "Comma separated list of hosts in cluster.") flags.DurationVarP((*time.Duration)(&Server.Config.Cluster.PollingInterval), "cluster.poll-interval", "", time.Minute, "Polling interval for cluster.") // TODO what actually is this?