From 7233597f35951eb5827cc3d2a059b190213dba4c Mon Sep 17 00:00:00 2001 From: Matthew Jaffee Date: Sun, 15 Apr 2018 17:20:14 -0500 Subject: [PATCH] remove DefaultConfig global (only used once). Fix data-dir comment --- config.go | 6 ++---- server.go | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/config.go b/config.go index c03f03ac3..483965916 100644 --- a/config.go +++ b/config.go @@ -25,9 +25,6 @@ const ( ClusterGossip = "gossip" ) -// DefaultConfig is a Config structure that holds all the default values. -var DefaultConfig = NewConfig() - // TLSConfig contains TLS configuration type TLSConfig struct { // CertificatePath contains the path to the certificate (.crt or .pem file) @@ -40,7 +37,8 @@ type TLSConfig struct { // Config represents the configuration for the command. type Config struct { - // DataDir is the default data directory. + // DataDir is the directory where Pilosa stores both indexed data and + // running state such as cluster topology information. DataDir string `toml:"data-dir"` // Bind is the host:port on which Pilosa will listen. Bind string `toml:"bind"` diff --git a/server.go b/server.go index 57ae423df..bb629b66a 100644 --- a/server.go +++ b/server.go @@ -107,7 +107,7 @@ func NewServer() *Server { NewAttrStore: NewNopAttrStore, - AntiEntropyInterval: time.Duration(DefaultConfig.AntiEntropy.Interval), + AntiEntropyInterval: time.Duration(NewConfig().AntiEntropy.Interval), MetricInterval: 0, DiagnosticInterval: 0,