Skip to content
This repository was archived by the owner on Jan 28, 2021. It is now read-only.

Commit 6aa453e

Browse files
author
Juanjo Alvarez
committed
gofmt + goimports
Signed-off-by: Juanjo Alvarez <[email protected]>
1 parent 5688ee6 commit 6aa453e

File tree

107 files changed

+142
-138
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+142
-138
lines changed

auth/auth.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ package auth
33
import (
44
"strings"
55

6-
"gopkg.in/src-d/go-errors.v1"
76
"github.com/src-d/go-mysql-server/sql"
7+
"gopkg.in/src-d/go-errors.v1"
88
"vitess.io/vitess/go/mysql"
99
)
1010

auth/common_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ import (
88
"os"
99
"testing"
1010

11-
"github.com/stretchr/testify/require"
1211
sqle "github.com/src-d/go-mysql-server"
1312
"github.com/src-d/go-mysql-server/auth"
1413
"github.com/src-d/go-mysql-server/memory"
1514
"github.com/src-d/go-mysql-server/server"
1615
"github.com/src-d/go-mysql-server/sql"
1716
"github.com/src-d/go-mysql-server/sql/analyzer"
1817
"github.com/src-d/go-mysql-server/sql/index/pilosa"
18+
"github.com/stretchr/testify/require"
1919
)
2020

2121
const port = 3336

internal/similartext/similartext_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func TestFindFromMap(t *testing.T) {
3737
res := FindFromMap(names, "")
3838
require.Empty(res)
3939

40-
names = map[string]int {
40+
names = map[string]int{
4141
"foo": 1,
4242
"bar": 2,
4343
}

internal/sockstate/sockstate.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@ package sockstate
22

33
import (
44
"fmt"
5-
"gopkg.in/src-d/go-errors.v1"
65
"net"
76
"os"
87
"strconv"
98
"strings"
9+
10+
"gopkg.in/src-d/go-errors.v1"
1011
)
1112

1213
type SockState uint8
@@ -34,7 +35,7 @@ func GetConnInode(c *net.TCPConn) (n uint64, err error) {
3435
}
3536

3637
if strings.HasPrefix(socketLnk, sockPrefix) {
37-
_, err = fmt.Sscanf(socketLnk, sockPrefix + "%d]", &n)
38+
_, err = fmt.Sscanf(socketLnk, sockPrefix+"%d]", &n)
3839
if err != nil {
3940
return
4041
}

memory/database_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ package memory
33
import (
44
"testing"
55

6-
"github.com/stretchr/testify/require"
76
"github.com/src-d/go-mysql-server/sql"
7+
"github.com/stretchr/testify/require"
88
)
99

1010
func TestDatabase_Name(t *testing.T) {

memory/table_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import (
55
"io"
66
"testing"
77

8-
"github.com/stretchr/testify/require"
98
"github.com/src-d/go-mysql-server/sql"
109
"github.com/src-d/go-mysql-server/sql/expression"
10+
"github.com/stretchr/testify/require"
1111
)
1212

1313
func TestTablePartitionsCount(t *testing.T) {

server/context.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ package server
22

33
import (
44
"context"
5+
"sync"
6+
57
"github.com/opentracing/opentracing-go"
68
"github.com/src-d/go-mysql-server/sql"
7-
"sync"
89
"vitess.io/vitess/go/mysql"
910
)
1011

server/handler.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,20 +43,20 @@ type conntainer struct {
4343

4444
// Handler is a connection handler for a SQLe engine.
4545
type Handler struct {
46-
mu sync.Mutex
47-
e *sqle.Engine
48-
sm *SessionManager
49-
c map[uint32]conntainer
46+
mu sync.Mutex
47+
e *sqle.Engine
48+
sm *SessionManager
49+
c map[uint32]conntainer
5050
readTimeout time.Duration
5151
lc []*net.Conn
5252
}
5353

5454
// NewHandler creates a new Handler given a SQLe engine.
5555
func NewHandler(e *sqle.Engine, sm *SessionManager, rt time.Duration) *Handler {
5656
return &Handler{
57-
e: e,
58-
sm: sm,
59-
c: make(map[uint32]conntainer),
57+
e: e,
58+
sm: sm,
59+
c: make(map[uint32]conntainer),
6060
readTimeout: rt,
6161
}
6262
}

server/handler_linux_test.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@ package server
22

33
import (
44
"fmt"
5+
"net"
6+
"testing"
7+
58
"github.com/opentracing/opentracing-go"
69
"github.com/src-d/go-mysql-server/sql"
710
"github.com/stretchr/testify/require"
8-
"net"
9-
"testing"
1011
"vitess.io/vitess/go/sqltypes"
1112
)
1213

@@ -49,5 +50,3 @@ func TestBrokenConnection(t *testing.T) {
4950
})
5051
require.EqualError(err, "connection was closed")
5152
}
52-
53-

server/handler_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@ package server
22

33
import (
44
"fmt"
5-
sqle "github.com/src-d/go-mysql-server"
6-
"github.com/src-d/go-mysql-server/sql"
75
"net"
86
"testing"
97
"time"
108

9+
sqle "github.com/src-d/go-mysql-server"
10+
"github.com/src-d/go-mysql-server/sql"
11+
1112
"vitess.io/vitess/go/mysql"
1213
"vitess.io/vitess/go/sqltypes"
1314
"vitess.io/vitess/go/vt/proto/query"
@@ -284,7 +285,7 @@ func TestOkClosedConnection(t *testing.T) {
284285
c2 := newConn(2)
285286
h.NewConnection(c2)
286287

287-
q := fmt.Sprintf("SELECT SLEEP(%d)", tcpCheckerSleepTime * 4)
288+
q := fmt.Sprintf("SELECT SLEEP(%d)", tcpCheckerSleepTime*4)
288289
err = h.ComQuery(c2, q, func(res *sqltypes.Result) error {
289290
return nil
290291
})

0 commit comments

Comments
 (0)