Merge pull request #84 from alibaba/bugfix-1.6.4

Bugfix 1.6.4
v4
Vinllen Chen 6 years ago committed by GitHub
commit 2beb9c368b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      README.md
  2. 12
      src/redis-shake/common/common.go

@ -67,7 +67,7 @@ User can use `-version` to print the version.
# Usage # Usage
--- ---
You can use the binary in the release package.<br> You can directly download the binary in the [release package](https://github.com/alibaba/RedisShake/releases).<br>
You can also build redis-shake yourself according to the following steps, the `go` and `govendor` must be installed before compile: You can also build redis-shake yourself according to the following steps, the `go` and `govendor` must be installed before compile:
* git clone https://github.com/alibaba/RedisShake.git * git clone https://github.com/alibaba/RedisShake.git
* cd RedisShake * cd RedisShake

@ -1,10 +1,10 @@
package utils package utils
import ( import (
"net" "bytes"
"fmt" "fmt"
"net"
"strings" "strings"
"bytes"
"pkg/libs/bytesize" "pkg/libs/bytesize"
"redis-shake/configure" "redis-shake/configure"
@ -26,7 +26,7 @@ const (
TencentCluster = "tencent_cluster" TencentCluster = "tencent_cluster"
AliyunCluster = "aliyun_cluster" AliyunCluster = "aliyun_cluster"
UCloudCluster = "ucloud_cluster" UCloudCluster = "ucloud_cluster"
) )
var ( var (
@ -56,7 +56,7 @@ func ReadRESPEnd(c net.Conn) (string, error) {
func RemoveRESPEnd(input string) string { func RemoveRESPEnd(input string) string {
length := len(input) length := len(input)
if length >= 2 { if length >= 2 {
return input[: length - 2] return input[:length-2]
} }
return input return input
} }
@ -75,8 +75,8 @@ func ParseInfo(content []byte) map[string]string {
} }
func GetTotalLink() int { func GetTotalLink() int {
if len(conf.Options.SourceAddress) != 0 { if len(conf.Options.SourceAddressList) != 0 {
return len(conf.Options.SourceAddress) return len(conf.Options.SourceAddressList)
} else { } else {
return len(conf.Options.RdbInput) return len(conf.Options.RdbInput)
} }

Loading…
Cancel
Save