Skip to content

Commit

Permalink
rm scan limit
Browse files Browse the repository at this point in the history
  • Loading branch information
XieBiao committed Jan 2, 2018
1 parent 7fbe88f commit f420112
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion analysis.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func NewAnalysis(redis *RedisClient) *Analysis {
return &Analysis{redis, DBReports{}}
}

func (analysis Analysis) Start(delimiters []string, limit uint64) {
func (analysis Analysis) Start(delimiters []string) {

match := "*[" + strings.Join(delimiters, "") + "]*"
databases, _ := analysis.redis.GetDatabases()
Expand Down
4 changes: 2 additions & 2 deletions examples/glide.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions examples/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
func main() {
redis, err := NewRedisClient("127.0.0.1", 6379, "")
if err != nil {
fmt.Println("Connect redis fail", err)
fmt.Println("connect redis fail", err)
return
}
defer redis.Close()
Expand All @@ -18,7 +18,7 @@ func main() {

//Scan the keys which can be split by '#' ':'
//Special pattern characters need to escape by '\'
analysis.Start([]string{"#", ":"}, 3000)
analysis.Start([]string{"#", ":"})

//Find the csv file in default target folder: ./reports
//CSV file name format: redis-analysis-{host:port}-{db}.csv
Expand Down
3 changes: 0 additions & 3 deletions storages/redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package storages

import (
"bytes"
"fmt"
"github.com/garyburd/redigo/redis"
"strconv"
"strings"
Expand All @@ -21,14 +20,12 @@ func NewRedisClient(host string, port uint16, password string) (*RedisClient, er

conn, err := redis.Dial("tcp", addr.String())
if err != nil {
fmt.Println("connect redis fail: ", err)
return nil, err
}

if password != "" {
_, err := conn.Do("AUTH", password)
if err != nil {
fmt.Println("auth fail:", err)
return nil, err
}
}
Expand Down

0 comments on commit f420112

Please sign in to comment.