From c0d3864c68918ff07ff5ae2907098a05f197b7b5 Mon Sep 17 00:00:00 2001 From: Tyler Nisonoff Date: Sat, 17 Oct 2015 21:07:25 -0700 Subject: [PATCH] formatted code --- plugins/redis/redis.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/redis/redis.go b/plugins/redis/redis.go index 786d7b284..4f4d87f9a 100644 --- a/plugins/redis/redis.go +++ b/plugins/redis/redis.go @@ -159,7 +159,7 @@ func gatherInfoOutput( acc plugins.Accumulator, tags map[string]string, ) error { - var keyspace_hits, keyspace_misses uint64 = 0,0 + var keyspace_hits, keyspace_misses uint64 = 0, 0 scanner := bufio.NewScanner(rdr) for scanner.Scan() { @@ -210,7 +210,7 @@ func gatherInfoOutput( } var keyspace_hitrate float64 = 0.0 if keyspace_hits != 0 || keyspace_misses != 0 { - keyspace_hitrate = float64(keyspace_hits) / float64(keyspace_hits + keyspace_misses) + keyspace_hitrate = float64(keyspace_hits) / float64(keyspace_hits+keyspace_misses) } fmt.Println(keyspace_hitrate) acc.Add("keyspace_hitrate", keyspace_hitrate, tags)