From fe49bcd9faa797ce96f39736f24e40b00ef4e1f3 Mon Sep 17 00:00:00 2001 From: Anton Evangelatov Date: Fri, 3 Jul 2020 19:52:15 +0200 Subject: [PATCH] make linter happy --- cmd/lotus-stats/main.go | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/cmd/lotus-stats/main.go b/cmd/lotus-stats/main.go index 2dd654737..ddc33b7ac 100644 --- a/cmd/lotus-stats/main.go +++ b/cmd/lotus-stats/main.go @@ -12,9 +12,9 @@ import ( var log = logging.Logger("stats") const ( - INFLUX_ADDR = "INFLUX_ADDR" - INFLUX_USER = "INFLUX_USER" - INFLUX_PASS = "INFLUX_PASS" + influxAddrEnvVar = "INFLUX_ADDR" + influxUserEnvVar = "INFLUX_USER" + influxPassEnvVar = "INFLUX_PASS" ) func main() { @@ -34,13 +34,9 @@ func main() { flag.Parse() - influxAddr := os.Getenv(INFLUX_ADDR) - influxUser := os.Getenv(INFLUX_USER) - influxPass := os.Getenv(INFLUX_PASS) - ctx := context.Background() - influx, err := stats.InfluxClient(influxAddr, influxUser, influxPass) + influx, err := stats.InfluxClient(os.Getenv(influxAddrEnvVar), os.Getenv(influxUserEnvVar), os.Getenv(influxPassEnvVar)) if err != nil { log.Fatal(err) }