File tree Expand file tree Collapse file tree 2 files changed +19
-19
lines changed Expand file tree Collapse file tree 2 files changed +19
-19
lines changed Original file line number Diff line number Diff line change @@ -38,12 +38,12 @@ func releaseConn(c *redis.Conn) {
38
38
39
39
func DoGet (userId string ) {
40
40
c := getConn ()
41
- c .Do ("INCR" ,userId )
42
- c .Close ()
41
+ c .Do ("INCR" , userId )
42
+ c .Close ()
43
43
}
44
44
45
45
func PipeGet (userId string ) {
46
- c := getConn ()
47
- c .Send ("INCR" ,userId )
48
- c .Close ()
46
+ c := getConn ()
47
+ c .Send ("INCR" , userId )
48
+ c .Close ()
49
49
}
Original file line number Diff line number Diff line change 1
1
package redistest
2
2
3
- import (
4
- "testing"
3
+ import (
4
+ "testing"
5
5
)
6
6
7
- func TestDoGet (t * testing.T ){
8
- DoGet ("test" )
7
+ func TestDoGet (t * testing.T ) {
8
+ DoGet ("test" )
9
9
}
10
10
11
- func TestPipeGet (t * testing.T ){
12
- PipeGet ("test" )
11
+ func TestPipeGet (t * testing.T ) {
12
+ PipeGet ("test" )
13
13
}
14
14
15
- func BenchmarkDoGet (b * testing.B ){
16
- for i := 0 ; i < b .N ;i ++ {
17
- DoGet ("test" )
18
- }
15
+ func BenchmarkDoGet (b * testing.B ) {
16
+ for i := 0 ; i < b .N ; i ++ {
17
+ DoGet ("test" )
18
+ }
19
19
}
20
20
21
- func BenchmarkPipeGet (b * testing.B ){
22
- for i := 0 ; i < b .N ;i ++ {
23
- PipeGet ("test" )
24
- }
21
+ func BenchmarkPipeGet (b * testing.B ) {
22
+ for i := 0 ; i < b .N ; i ++ {
23
+ PipeGet ("test" )
24
+ }
25
25
}
You can’t perform that action at this time.
0 commit comments