Skip to content

Commit

Permalink
trim white space from redis pwd file contents (oliver006#259)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliver006 authored May 9, 2019
1 parent 6ca1466 commit 1c168d0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"os"
"runtime"
"strconv"
"strings"

"github.com/oliver006/redis_exporter/exporter"
"github.com/prometheus/client_golang/prometheus"
Expand Down Expand Up @@ -92,7 +93,7 @@ func main() {
if err != nil {
log.Fatal(err)
}
parsedRedisPassword = string(b)
parsedRedisPassword = strings.TrimSpace(string(b))
} else {
parsedRedisPassword = *redisPassword
}
Expand Down

0 comments on commit 1c168d0

Please sign in to comment.