Skip to content

Commit e4cd09d

Browse files
committed
go fmt
1 parent 0259d3a commit e4cd09d

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

redis_test/conn.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ func releaseConn(c *redis.Conn) {
3838

3939
func DoGet(userId string) {
4040
c := getConn()
41-
c.Do("INCR",userId)
42-
c.Close()
41+
c.Do("INCR", userId)
42+
c.Close()
4343
}
4444

4545
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()
4949
}

redis_test/conn_test.go

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
package redistest
22

3-
import(
4-
"testing"
3+
import (
4+
"testing"
55
)
66

7-
func TestDoGet(t *testing.T){
8-
DoGet("test")
7+
func TestDoGet(t *testing.T) {
8+
DoGet("test")
99
}
1010

11-
func TestPipeGet(t *testing.T){
12-
PipeGet("test")
11+
func TestPipeGet(t *testing.T) {
12+
PipeGet("test")
1313
}
1414

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+
}
1919
}
2020

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+
}
2525
}

0 commit comments

Comments
 (0)