1
0
mirror of https://github.com/redis/go-redis.git synced 2025-08-06 01:35:48 +03:00

Code cleanup

This commit is contained in:
Vladimir Mihailenco
2017-03-31 15:11:11 +03:00
parent 18dcec2144
commit ef95182d29
7 changed files with 3 additions and 33 deletions

View File

@@ -30,19 +30,6 @@ func sliceParser(rd *proto.Reader, n int64) (interface{}, error) {
return vals, nil
}
// Implements proto.MultiBulkParse
func intSliceParser(rd *proto.Reader, n int64) (interface{}, error) {
ints := make([]int64, 0, n)
for i := int64(0); i < n; i++ {
n, err := rd.ReadIntReply()
if err != nil {
return nil, err
}
ints = append(ints, n)
}
return ints, nil
}
// Implements proto.MultiBulkParse
func boolSliceParser(rd *proto.Reader, n int64) (interface{}, error) {
bools := make([]bool, 0, n)
@@ -72,19 +59,6 @@ func stringSliceParser(rd *proto.Reader, n int64) (interface{}, error) {
return ss, nil
}
// Implements proto.MultiBulkParse
func floatSliceParser(rd *proto.Reader, n int64) (interface{}, error) {
nn := make([]float64, 0, n)
for i := int64(0); i < n; i++ {
n, err := rd.ReadFloatReply()
if err != nil {
return nil, err
}
nn = append(nn, n)
}
return nn, nil
}
// Implements proto.MultiBulkParse
func stringStringMapParser(rd *proto.Reader, n int64) (interface{}, error) {
m := make(map[string]string, n/2)