Skip to content

Commit

Permalink
make linter happy
Browse files Browse the repository at this point in the history
  • Loading branch information
nonsense committed Jul 3, 2020
1 parent 4679c35 commit fe49bcd
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions cmd/lotus-stats/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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)
}
Expand Down

0 comments on commit fe49bcd

Please sign in to comment.