Skip to content

Commit

Permalink
Fixup for g->r change, io.reader was already using 'r'
Browse files Browse the repository at this point in the history
  • Loading branch information
sparrc committed Aug 31, 2015
1 parent 9c57c30 commit 4d19fc0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions plugins/redis/redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ func (r *Redis) gatherServer(addr *url.URL, acc plugins.Accumulator) error {
if set && pwd != "" {
c.Write([]byte(fmt.Sprintf("AUTH %s\r\n", pwd)))

r := bufio.NewReader(c)
rdr := bufio.NewReader(c)

line, err := r.ReadString('\n')
line, err := rdr.ReadString('\n')
if err != nil {
return err
}
Expand All @@ -146,9 +146,9 @@ func (r *Redis) gatherServer(addr *url.URL, acc plugins.Accumulator) error {

r.c.Write([]byte("info\r\n"))

r := bufio.NewReader(r.c)
rdr := bufio.NewReader(r.c)

line, err := r.ReadString('\n')
line, err := rdr.ReadString('\n')
if err != nil {
return err
}
Expand All @@ -169,7 +169,7 @@ func (r *Redis) gatherServer(addr *url.URL, acc plugins.Accumulator) error {
var read int

for read < sz {
line, err := r.ReadString('\n')
line, err := rdr.ReadString('\n')
if err != nil {
return err
}
Expand Down

0 comments on commit 4d19fc0

Please sign in to comment.