Skip to content

Commit a3748a0

Browse files
code: run go fmt
1 parent c84ec85 commit a3748a0

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

smallbuf.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ func (s *smallBuf) Bytes() []byte {
5252
}
5353

5454
type smallWBuf struct {
55-
b []byte
55+
b []byte
5656
sum uint
57-
n uint
57+
n uint
5858
}
5959

6060
func (s *smallWBuf) Write(b []byte) (int, error) {
@@ -85,11 +85,11 @@ func (s *smallWBuf) Trunc(n int) {
8585
}
8686

8787
func (s *smallWBuf) Reset() {
88-
s.sum = uint(uint64(s.sum) * 15 / 16) + uint(len(s.b))
88+
s.sum = uint(uint64(s.sum)*15/16) + uint(len(s.b))
8989
if s.n < 16 {
9090
s.n++
9191
}
92-
if cap(s.b) > 1024 && s.sum / s.n < uint(cap(s.b))/4 {
92+
if cap(s.b) > 1024 && s.sum/s.n < uint(cap(s.b))/4 {
9393
s.b = make([]byte, 0, s.sum/s.n)
9494
} else {
9595
s.b = s.b[:0]

uuid/uuid.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func encodeUUID(e *msgpack.Encoder, v reflect.Value) error {
3131
}
3232

3333
func decodeUUID(d *msgpack.Decoder, v reflect.Value) error {
34-
var bytesCount int = 16;
34+
var bytesCount int = 16
3535
bytes := make([]byte, bytesCount)
3636

3737
n, err := d.Buffered().Read(bytes)

uuid/uuid_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ import (
55
"testing"
66
"time"
77

8+
"github.com/google/uuid"
89
. "github.com/tarantool/go-tarantool"
9-
_ "github.com/tarantool/go-tarantool/uuid"
10+
_ "github.com/tarantool/go-tarantool/uuid"
1011
"gopkg.in/vmihailenco/msgpack.v2"
11-
"github.com/google/uuid"
1212
)
1313

1414
var server = "127.0.0.1:3013"
@@ -98,7 +98,7 @@ func TestSelect(t *testing.T) {
9898
t.Errorf("Failed to prepare test uuid: %s", uuidErr)
9999
}
100100

101-
resp, errSel := conn.Select(space, index, 0, 1, IterEq, []interface{}{ id })
101+
resp, errSel := conn.Select(space, index, 0, 1, IterEq, []interface{}{id})
102102
if errSel != nil {
103103
t.Errorf("UUID select failed: %s", errSel.Error())
104104
}
@@ -108,7 +108,7 @@ func TestSelect(t *testing.T) {
108108
tupleValueIsId(t, resp.Data, id)
109109

110110
var tuples []TupleUUID
111-
errTyp := conn.SelectTyped(space, index, 0, 1, IterEq, []interface{}{ id }, &tuples)
111+
errTyp := conn.SelectTyped(space, index, 0, 1, IterEq, []interface{}{id}, &tuples)
112112
if errTyp != nil {
113113
t.Errorf("Failed to SelectTyped: %s", errTyp.Error())
114114
}
@@ -131,7 +131,7 @@ func TestReplace(t *testing.T) {
131131
t.Errorf("Failed to prepare test uuid: %s", uuidErr)
132132
}
133133

134-
respRep, errRep := conn.Replace(space, []interface{}{ id })
134+
respRep, errRep := conn.Replace(space, []interface{}{id})
135135
if errRep != nil {
136136
t.Errorf("UUID replace failed: %s", errRep)
137137
}
@@ -140,7 +140,7 @@ func TestReplace(t *testing.T) {
140140
}
141141
tupleValueIsId(t, respRep.Data, id)
142142

143-
respSel, errSel := conn.Select(space, index, 0, 1, IterEq, []interface{}{ id })
143+
respSel, errSel := conn.Select(space, index, 0, 1, IterEq, []interface{}{id})
144144
if errSel != nil {
145145
t.Errorf("UUID select failed: %s", errSel)
146146
}

0 commit comments

Comments
 (0)