File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change 11package storages
22
33import (
4- "github.com/garyburd/redigo/redis"
5- "fmt"
64 "bytes"
7- "strings"
5+ "fmt"
6+ "github.com/garyburd/redigo/redis"
87 "strconv"
8+ "strings"
99)
1010
1111type RedisClient struct {
@@ -89,14 +89,16 @@ func (client RedisClient) SerializedLength(key string) (uint64, error) {
8989 reply , err := client .conn .Do ("DEBUG" , "OBJECT" , key )
9090 debug , err := redis .String (reply , err )
9191
92- debugs := strings .Split (debug , " " )
93- items := strings .Split (debugs [4 ], ":" )
9492 if err != nil {
9593 return 0 , err
9694 }
95+
96+ debugs := strings .Split (debug , " " )
97+ items := strings .Split (debugs [4 ], ":" )
98+
9799 return strconv .ParseUint (items [1 ], 10 , 64 )
98100}
99101
100- func (client RedisClient ) Close () ( error ) {
102+ func (client RedisClient ) Close () error {
101103 return client .conn .Close ()
102104}
You can’t perform that action at this time.
0 commit comments