diff --git a/auth/auth.go b/auth/auth.go index b995fba1a..d2ea68d5e 100644 --- a/auth/auth.go +++ b/auth/auth.go @@ -3,8 +3,8 @@ package auth import ( "strings" - "gopkg.in/src-d/go-errors.v1" "github.com/src-d/go-mysql-server/sql" + "gopkg.in/src-d/go-errors.v1" "vitess.io/vitess/go/mysql" ) diff --git a/auth/common_test.go b/auth/common_test.go index cca7b04f9..8f2ebdf99 100644 --- a/auth/common_test.go +++ b/auth/common_test.go @@ -8,7 +8,6 @@ import ( "os" "testing" - "github.com/stretchr/testify/require" sqle "github.com/src-d/go-mysql-server" "github.com/src-d/go-mysql-server/auth" "github.com/src-d/go-mysql-server/memory" @@ -16,6 +15,7 @@ import ( "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/analyzer" "github.com/src-d/go-mysql-server/sql/index/pilosa" + "github.com/stretchr/testify/require" ) const port = 3336 diff --git a/internal/similartext/similartext_test.go b/internal/similartext/similartext_test.go index 7b79bd5d3..bfacc6802 100644 --- a/internal/similartext/similartext_test.go +++ b/internal/similartext/similartext_test.go @@ -37,7 +37,7 @@ func TestFindFromMap(t *testing.T) { res := FindFromMap(names, "") require.Empty(res) - names = map[string]int { + names = map[string]int{ "foo": 1, "bar": 2, } diff --git a/internal/sockstate/sockstate.go b/internal/sockstate/sockstate.go index fea1e5aaf..42980176d 100644 --- a/internal/sockstate/sockstate.go +++ b/internal/sockstate/sockstate.go @@ -2,11 +2,12 @@ package sockstate import ( "fmt" - "gopkg.in/src-d/go-errors.v1" "net" "os" "strconv" "strings" + + "gopkg.in/src-d/go-errors.v1" ) type SockState uint8 @@ -34,7 +35,7 @@ func GetConnInode(c *net.TCPConn) (n uint64, err error) { } if strings.HasPrefix(socketLnk, sockPrefix) { - _, err = fmt.Sscanf(socketLnk, sockPrefix + "%d]", &n) + _, err = fmt.Sscanf(socketLnk, sockPrefix+"%d]", &n) if err != nil { return } diff --git a/memory/database_test.go b/memory/database_test.go index ce7dca623..e41c9e289 100644 --- a/memory/database_test.go +++ b/memory/database_test.go @@ -3,8 +3,8 @@ package memory import ( "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/sql" + "github.com/stretchr/testify/require" ) func TestDatabase_Name(t *testing.T) { diff --git a/memory/table_test.go b/memory/table_test.go index be0bea3e6..224ea5645 100644 --- a/memory/table_test.go +++ b/memory/table_test.go @@ -5,9 +5,9 @@ import ( "io" "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/expression" + "github.com/stretchr/testify/require" ) func TestTablePartitionsCount(t *testing.T) { diff --git a/server/context.go b/server/context.go index 07724e81b..ca2d7ce7b 100644 --- a/server/context.go +++ b/server/context.go @@ -2,9 +2,10 @@ package server import ( "context" + "sync" + "github.com/opentracing/opentracing-go" "github.com/src-d/go-mysql-server/sql" - "sync" "vitess.io/vitess/go/mysql" ) diff --git a/server/handler.go b/server/handler.go index f2ced0235..52c120e93 100644 --- a/server/handler.go +++ b/server/handler.go @@ -43,10 +43,10 @@ type conntainer struct { // Handler is a connection handler for a SQLe engine. type Handler struct { - mu sync.Mutex - e *sqle.Engine - sm *SessionManager - c map[uint32]conntainer + mu sync.Mutex + e *sqle.Engine + sm *SessionManager + c map[uint32]conntainer readTimeout time.Duration lc []*net.Conn } @@ -54,9 +54,9 @@ type Handler struct { // NewHandler creates a new Handler given a SQLe engine. func NewHandler(e *sqle.Engine, sm *SessionManager, rt time.Duration) *Handler { return &Handler{ - e: e, - sm: sm, - c: make(map[uint32]conntainer), + e: e, + sm: sm, + c: make(map[uint32]conntainer), readTimeout: rt, } } diff --git a/server/handler_linux_test.go b/server/handler_linux_test.go index 8434c9690..9dfc6eb31 100644 --- a/server/handler_linux_test.go +++ b/server/handler_linux_test.go @@ -2,11 +2,12 @@ package server import ( "fmt" + "net" + "testing" + "github.com/opentracing/opentracing-go" "github.com/src-d/go-mysql-server/sql" "github.com/stretchr/testify/require" - "net" - "testing" "vitess.io/vitess/go/sqltypes" ) @@ -49,5 +50,3 @@ func TestBrokenConnection(t *testing.T) { }) require.EqualError(err, "connection was closed") } - - diff --git a/server/handler_test.go b/server/handler_test.go index 915d84832..96f169b51 100644 --- a/server/handler_test.go +++ b/server/handler_test.go @@ -2,12 +2,13 @@ package server import ( "fmt" - sqle "github.com/src-d/go-mysql-server" - "github.com/src-d/go-mysql-server/sql" "net" "testing" "time" + sqle "github.com/src-d/go-mysql-server" + "github.com/src-d/go-mysql-server/sql" + "vitess.io/vitess/go/mysql" "vitess.io/vitess/go/sqltypes" "vitess.io/vitess/go/vt/proto/query" @@ -284,7 +285,7 @@ func TestOkClosedConnection(t *testing.T) { c2 := newConn(2) h.NewConnection(c2) - q := fmt.Sprintf("SELECT SLEEP(%d)", tcpCheckerSleepTime * 4) + q := fmt.Sprintf("SELECT SLEEP(%d)", tcpCheckerSleepTime*4) err = h.ComQuery(c2, q, func(res *sqltypes.Result) error { return nil }) diff --git a/sql/analyzer/aggregations_test.go b/sql/analyzer/aggregations_test.go index a85533ee3..b4333becd 100644 --- a/sql/analyzer/aggregations_test.go +++ b/sql/analyzer/aggregations_test.go @@ -3,12 +3,12 @@ package analyzer import ( "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/memory" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/expression" "github.com/src-d/go-mysql-server/sql/expression/function/aggregation" "github.com/src-d/go-mysql-server/sql/plan" + "github.com/stretchr/testify/require" ) func TestReorderAggregations(t *testing.T) { diff --git a/sql/analyzer/analyzer_test.go b/sql/analyzer/analyzer_test.go index 0d0564b57..53f85fcd5 100644 --- a/sql/analyzer/analyzer_test.go +++ b/sql/analyzer/analyzer_test.go @@ -4,11 +4,11 @@ import ( "fmt" "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/memory" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/expression" "github.com/src-d/go-mysql-server/sql/plan" + "github.com/stretchr/testify/require" ) func TestAnalyzer_Analyze(t *testing.T) { diff --git a/sql/analyzer/assign_catalog_test.go b/sql/analyzer/assign_catalog_test.go index 133299455..39aed1a4f 100644 --- a/sql/analyzer/assign_catalog_test.go +++ b/sql/analyzer/assign_catalog_test.go @@ -3,10 +3,10 @@ package analyzer import ( "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/memory" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/plan" + "github.com/stretchr/testify/require" ) func TestAssignCatalog(t *testing.T) { diff --git a/sql/analyzer/assign_indexes.go b/sql/analyzer/assign_indexes.go index 1b3a4da97..4462cb915 100644 --- a/sql/analyzer/assign_indexes.go +++ b/sql/analyzer/assign_indexes.go @@ -3,10 +3,10 @@ package analyzer import ( "reflect" - errors "gopkg.in/src-d/go-errors.v1" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/expression" "github.com/src-d/go-mysql-server/sql/plan" + errors "gopkg.in/src-d/go-errors.v1" ) var errInvalidInRightEvaluation = errors.NewKind("expecting evaluation of IN expression right hand side to be a tuple, but it is %T") diff --git a/sql/analyzer/assign_indexes_test.go b/sql/analyzer/assign_indexes_test.go index 26793ba95..d8e61f05a 100644 --- a/sql/analyzer/assign_indexes_test.go +++ b/sql/analyzer/assign_indexes_test.go @@ -5,11 +5,11 @@ import ( "strings" "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/memory" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/expression" "github.com/src-d/go-mysql-server/sql/plan" + "github.com/stretchr/testify/require" ) func TestNegateIndex(t *testing.T) { diff --git a/sql/analyzer/filters_test.go b/sql/analyzer/filters_test.go index 1153c2dc9..999b95a6a 100644 --- a/sql/analyzer/filters_test.go +++ b/sql/analyzer/filters_test.go @@ -3,9 +3,9 @@ package analyzer import ( "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/expression" + "github.com/stretchr/testify/require" ) func TestFiltersMerge(t *testing.T) { diff --git a/sql/analyzer/optimization_rules_test.go b/sql/analyzer/optimization_rules_test.go index d036a6c32..285117251 100644 --- a/sql/analyzer/optimization_rules_test.go +++ b/sql/analyzer/optimization_rules_test.go @@ -3,11 +3,11 @@ package analyzer import ( "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/memory" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/expression" "github.com/src-d/go-mysql-server/sql/plan" + "github.com/stretchr/testify/require" ) func TestReorderProjection(t *testing.T) { diff --git a/sql/analyzer/process_test.go b/sql/analyzer/process_test.go index 6426e01ab..32a719500 100644 --- a/sql/analyzer/process_test.go +++ b/sql/analyzer/process_test.go @@ -5,11 +5,11 @@ import ( "testing" "time" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/memory" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/expression" "github.com/src-d/go-mysql-server/sql/plan" + "github.com/stretchr/testify/require" ) func TestTrackProcess(t *testing.T) { diff --git a/sql/analyzer/prune_columns_test.go b/sql/analyzer/prune_columns_test.go index 15724577a..e2a1c2abd 100644 --- a/sql/analyzer/prune_columns_test.go +++ b/sql/analyzer/prune_columns_test.go @@ -3,11 +3,11 @@ package analyzer import ( "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/memory" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/expression" "github.com/src-d/go-mysql-server/sql/plan" + "github.com/stretchr/testify/require" ) func TestPruneColumns(t *testing.T) { diff --git a/sql/analyzer/resolve_columns_test.go b/sql/analyzer/resolve_columns_test.go index 7cf178f94..4b111e943 100644 --- a/sql/analyzer/resolve_columns_test.go +++ b/sql/analyzer/resolve_columns_test.go @@ -4,11 +4,11 @@ import ( "context" "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/memory" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/expression" "github.com/src-d/go-mysql-server/sql/plan" + "github.com/stretchr/testify/require" ) func TestQualifyColumnsProject(t *testing.T) { diff --git a/sql/analyzer/resolve_generators_test.go b/sql/analyzer/resolve_generators_test.go index 0709e0d81..8a7106df8 100644 --- a/sql/analyzer/resolve_generators_test.go +++ b/sql/analyzer/resolve_generators_test.go @@ -3,12 +3,12 @@ package analyzer import ( "testing" - "github.com/stretchr/testify/require" - "gopkg.in/src-d/go-errors.v1" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/expression" "github.com/src-d/go-mysql-server/sql/expression/function" "github.com/src-d/go-mysql-server/sql/plan" + "github.com/stretchr/testify/require" + "gopkg.in/src-d/go-errors.v1" ) func TestResolveGenerators(t *testing.T) { diff --git a/sql/analyzer/resolve_natural_joins_test.go b/sql/analyzer/resolve_natural_joins_test.go index fa424440a..4030f8f93 100644 --- a/sql/analyzer/resolve_natural_joins_test.go +++ b/sql/analyzer/resolve_natural_joins_test.go @@ -3,11 +3,11 @@ package analyzer import ( "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/memory" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/expression" "github.com/src-d/go-mysql-server/sql/plan" + "github.com/stretchr/testify/require" ) func TestResolveNaturalJoins(t *testing.T) { diff --git a/sql/analyzer/resolve_orderby_test.go b/sql/analyzer/resolve_orderby_test.go index ecf84f857..119c197a4 100644 --- a/sql/analyzer/resolve_orderby_test.go +++ b/sql/analyzer/resolve_orderby_test.go @@ -3,11 +3,11 @@ package analyzer import ( "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/memory" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/expression" "github.com/src-d/go-mysql-server/sql/plan" + "github.com/stretchr/testify/require" ) func TestResolveOrderBy(t *testing.T) { diff --git a/sql/analyzer/resolve_stars_test.go b/sql/analyzer/resolve_stars_test.go index 24fcf46bd..b6006271f 100644 --- a/sql/analyzer/resolve_stars_test.go +++ b/sql/analyzer/resolve_stars_test.go @@ -3,11 +3,11 @@ package analyzer import ( "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/memory" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/expression" "github.com/src-d/go-mysql-server/sql/plan" + "github.com/stretchr/testify/require" ) func TestResolveStar(t *testing.T) { diff --git a/sql/analyzer/resolve_subqueries_test.go b/sql/analyzer/resolve_subqueries_test.go index d03878bb1..04e97832a 100644 --- a/sql/analyzer/resolve_subqueries_test.go +++ b/sql/analyzer/resolve_subqueries_test.go @@ -3,11 +3,11 @@ package analyzer import ( "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/memory" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/expression" "github.com/src-d/go-mysql-server/sql/plan" + "github.com/stretchr/testify/require" ) func TestResolveSubqueries(t *testing.T) { diff --git a/sql/analyzer/resolve_tables_test.go b/sql/analyzer/resolve_tables_test.go index 2debe3d0a..fbc4fcca0 100644 --- a/sql/analyzer/resolve_tables_test.go +++ b/sql/analyzer/resolve_tables_test.go @@ -3,11 +3,11 @@ package analyzer import ( "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/memory" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/expression" "github.com/src-d/go-mysql-server/sql/plan" + "github.com/stretchr/testify/require" ) func TestResolveTables(t *testing.T) { diff --git a/sql/catalog_test.go b/sql/catalog_test.go index 176011986..3aef282e4 100644 --- a/sql/catalog_test.go +++ b/sql/catalog_test.go @@ -3,9 +3,9 @@ package sql_test import ( "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/memory" "github.com/src-d/go-mysql-server/sql" + "github.com/stretchr/testify/require" ) func TestCatalogCurrentDatabase(t *testing.T) { diff --git a/sql/expression/arithmetic_test.go b/sql/expression/arithmetic_test.go index afb97c926..811039734 100644 --- a/sql/expression/arithmetic_test.go +++ b/sql/expression/arithmetic_test.go @@ -4,8 +4,8 @@ import ( "testing" "time" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/sql" + "github.com/stretchr/testify/require" ) func TestPlus(t *testing.T) { diff --git a/sql/expression/between_test.go b/sql/expression/between_test.go index 34cce2a4b..58fd7bb1a 100644 --- a/sql/expression/between_test.go +++ b/sql/expression/between_test.go @@ -3,8 +3,8 @@ package expression import ( "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/sql" + "github.com/stretchr/testify/require" ) func TestBetween(t *testing.T) { diff --git a/sql/expression/boolean_test.go b/sql/expression/boolean_test.go index dd98f491e..aff618485 100644 --- a/sql/expression/boolean_test.go +++ b/sql/expression/boolean_test.go @@ -4,8 +4,8 @@ import ( "testing" "time" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/sql" + "github.com/stretchr/testify/require" ) func TestNot(t *testing.T) { diff --git a/sql/expression/common_test.go b/sql/expression/common_test.go index a406a4caf..e00d3270f 100644 --- a/sql/expression/common_test.go +++ b/sql/expression/common_test.go @@ -3,8 +3,8 @@ package expression import ( "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/sql" + "github.com/stretchr/testify/require" ) func eval(t *testing.T, e sql.Expression, row sql.Row) interface{} { diff --git a/sql/expression/comparison_test.go b/sql/expression/comparison_test.go index af2c0b94e..c69d1fdc5 100644 --- a/sql/expression/comparison_test.go +++ b/sql/expression/comparison_test.go @@ -3,9 +3,9 @@ package expression import ( "testing" - errors "gopkg.in/src-d/go-errors.v1" "github.com/src-d/go-mysql-server/internal/regex" "github.com/src-d/go-mysql-server/sql" + errors "gopkg.in/src-d/go-errors.v1" "github.com/stretchr/testify/require" ) diff --git a/sql/expression/convert_test.go b/sql/expression/convert_test.go index b2eab45a1..726c68f8e 100644 --- a/sql/expression/convert_test.go +++ b/sql/expression/convert_test.go @@ -4,8 +4,8 @@ import ( "testing" "time" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/sql" + "github.com/stretchr/testify/require" ) func TestConvert(t *testing.T) { diff --git a/sql/expression/function/aggregation/avg_test.go b/sql/expression/function/aggregation/avg_test.go index 491b56b2d..b63114185 100644 --- a/sql/expression/function/aggregation/avg_test.go +++ b/sql/expression/function/aggregation/avg_test.go @@ -3,9 +3,9 @@ package aggregation import ( "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/expression" + "github.com/stretchr/testify/require" ) func TestAvg_String(t *testing.T) { diff --git a/sql/expression/function/aggregation/max_test.go b/sql/expression/function/aggregation/max_test.go index 2f405943b..f8da09942 100644 --- a/sql/expression/function/aggregation/max_test.go +++ b/sql/expression/function/aggregation/max_test.go @@ -4,9 +4,9 @@ import ( "testing" "time" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/expression" + "github.com/stretchr/testify/require" ) func TestMax_String(t *testing.T) { diff --git a/sql/expression/function/aggregation/min_test.go b/sql/expression/function/aggregation/min_test.go index d76662a63..6039219d6 100644 --- a/sql/expression/function/aggregation/min_test.go +++ b/sql/expression/function/aggregation/min_test.go @@ -4,9 +4,9 @@ import ( "testing" "time" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/expression" + "github.com/stretchr/testify/require" ) func TestMin_Name(t *testing.T) { diff --git a/sql/expression/function/aggregation/sum_test.go b/sql/expression/function/aggregation/sum_test.go index e749f13af..37b29324e 100644 --- a/sql/expression/function/aggregation/sum_test.go +++ b/sql/expression/function/aggregation/sum_test.go @@ -3,9 +3,9 @@ package aggregation import ( "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/expression" + "github.com/stretchr/testify/require" ) func TestSum(t *testing.T) { diff --git a/sql/expression/function/ceil_round_floor_test.go b/sql/expression/function/ceil_round_floor_test.go index 9c3abd191..2ad014c42 100644 --- a/sql/expression/function/ceil_round_floor_test.go +++ b/sql/expression/function/ceil_round_floor_test.go @@ -3,10 +3,10 @@ package function import ( "testing" - "github.com/stretchr/testify/require" - "gopkg.in/src-d/go-errors.v1" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/expression" + "github.com/stretchr/testify/require" + "gopkg.in/src-d/go-errors.v1" ) func TestCeil(t *testing.T) { diff --git a/sql/expression/function/coalesce_test.go b/sql/expression/function/coalesce_test.go index 6f6faf3c8..a1fd6a89d 100644 --- a/sql/expression/function/coalesce_test.go +++ b/sql/expression/function/coalesce_test.go @@ -3,9 +3,9 @@ package function import ( "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/expression" + "github.com/stretchr/testify/require" ) func TestEmptyCoalesce(t *testing.T) { diff --git a/sql/expression/function/common_test.go b/sql/expression/function/common_test.go index 61c2564a2..3fbc45989 100644 --- a/sql/expression/function/common_test.go +++ b/sql/expression/function/common_test.go @@ -3,8 +3,8 @@ package function import ( "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/sql" + "github.com/stretchr/testify/require" ) func eval(t *testing.T, e sql.Expression, row sql.Row) interface{} { diff --git a/sql/expression/function/concat_test.go b/sql/expression/function/concat_test.go index 7fb5e6f9f..450c0c442 100644 --- a/sql/expression/function/concat_test.go +++ b/sql/expression/function/concat_test.go @@ -3,9 +3,9 @@ package function import ( "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/expression" + "github.com/stretchr/testify/require" ) func TestConcat(t *testing.T) { diff --git a/sql/expression/function/concat_ws_test.go b/sql/expression/function/concat_ws_test.go index 80367f462..7ec7bdc0c 100644 --- a/sql/expression/function/concat_ws_test.go +++ b/sql/expression/function/concat_ws_test.go @@ -3,9 +3,9 @@ package function import ( "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/expression" + "github.com/stretchr/testify/require" ) func TestConcatWithSeparator(t *testing.T) { @@ -72,7 +72,7 @@ func TestConcatWithSeparator(t *testing.T) { t.Run("concat_ws array", func(t *testing.T) { require := require.New(t) f, err := NewConcatWithSeparator( - expression.NewLiteral([]interface{}{",",5, "bar", true}, sql.Array(sql.Text)), + expression.NewLiteral([]interface{}{",", 5, "bar", true}, sql.Array(sql.Text)), ) require.NoError(err) diff --git a/sql/expression/function/connection_id_test.go b/sql/expression/function/connection_id_test.go index ffd20ce16..5a9699899 100644 --- a/sql/expression/function/connection_id_test.go +++ b/sql/expression/function/connection_id_test.go @@ -4,8 +4,8 @@ import ( "context" "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/sql" + "github.com/stretchr/testify/require" ) func TestConnectionID(t *testing.T) { diff --git a/sql/expression/function/date_test.go b/sql/expression/function/date_test.go index 85940eea7..18f436ed9 100644 --- a/sql/expression/function/date_test.go +++ b/sql/expression/function/date_test.go @@ -4,9 +4,9 @@ import ( "testing" "time" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/expression" + "github.com/stretchr/testify/require" ) func TestDateAdd(t *testing.T) { diff --git a/sql/expression/function/greatest_least_test.go b/sql/expression/function/greatest_least_test.go index e57bc9176..b75ea0bba 100644 --- a/sql/expression/function/greatest_least_test.go +++ b/sql/expression/function/greatest_least_test.go @@ -1,11 +1,12 @@ package function import ( - "github.com/stretchr/testify/require" - "github.com/src-d/go-mysql-server/sql" - "github.com/src-d/go-mysql-server/sql/expression" "testing" "unsafe" + + "github.com/src-d/go-mysql-server/sql" + "github.com/src-d/go-mysql-server/sql/expression" + "github.com/stretchr/testify/require" ) func TestGreatest(t *testing.T) { diff --git a/sql/expression/function/ifnull_test.go b/sql/expression/function/ifnull_test.go index a7a6d2787..1751fe215 100644 --- a/sql/expression/function/ifnull_test.go +++ b/sql/expression/function/ifnull_test.go @@ -3,9 +3,9 @@ package function import ( "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/expression" + "github.com/stretchr/testify/require" ) func TestIfNull(t *testing.T) { diff --git a/sql/expression/function/isbinary_test.go b/sql/expression/function/isbinary_test.go index bb0b00e68..375ac03e5 100644 --- a/sql/expression/function/isbinary_test.go +++ b/sql/expression/function/isbinary_test.go @@ -3,9 +3,9 @@ package function import ( "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/expression" + "github.com/stretchr/testify/require" ) func TestIsBinary(t *testing.T) { diff --git a/sql/expression/function/json_extract_test.go b/sql/expression/function/json_extract_test.go index 05ec7037c..06f94cbfc 100644 --- a/sql/expression/function/json_extract_test.go +++ b/sql/expression/function/json_extract_test.go @@ -4,9 +4,9 @@ import ( "errors" "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/expression" + "github.com/stretchr/testify/require" ) func TestJSONExtract(t *testing.T) { diff --git a/sql/expression/function/length_test.go b/sql/expression/function/length_test.go index 96e736fdd..59c6f95d9 100644 --- a/sql/expression/function/length_test.go +++ b/sql/expression/function/length_test.go @@ -3,9 +3,9 @@ package function import ( "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/expression" + "github.com/stretchr/testify/require" ) func TestLength(t *testing.T) { diff --git a/sql/expression/function/logarithm_test.go b/sql/expression/function/logarithm_test.go index 0b4cfcc2f..7c5c7d59d 100644 --- a/sql/expression/function/logarithm_test.go +++ b/sql/expression/function/logarithm_test.go @@ -1,14 +1,14 @@ package function import ( - "testing" - "math" "fmt" + "math" + "testing" - "github.com/src-d/go-mysql-server/sql/expression" "github.com/src-d/go-mysql-server/sql" - "gopkg.in/src-d/go-errors.v1" + "github.com/src-d/go-mysql-server/sql/expression" "github.com/stretchr/testify/require" + "gopkg.in/src-d/go-errors.v1" ) var epsilon = math.Nextafter(1, 2) - 1 @@ -42,7 +42,7 @@ func TestLn(t *testing.T) { require.True(tt.err.Is(err)) } else { require.NoError(err) - require.InEpsilonf(tt.expected, result, epsilon, fmt.Sprintf("Actual is: %v", result), ) + require.InEpsilonf(tt.expected, result, epsilon, fmt.Sprintf("Actual is: %v", result)) } }) } @@ -85,7 +85,7 @@ func TestLog2(t *testing.T) { require.True(tt.err.Is(err)) } else { require.NoError(err) - require.InEpsilonf(tt.expected, result, epsilon, fmt.Sprintf("Actual is: %v", result), ) + require.InEpsilonf(tt.expected, result, epsilon, fmt.Sprintf("Actual is: %v", result)) } }) } @@ -128,7 +128,7 @@ func TestLog10(t *testing.T) { require.True(tt.err.Is(err)) } else { require.NoError(err) - require.InEpsilonf(tt.expected, result, epsilon, fmt.Sprintf("Actual is: %v", result), ) + require.InEpsilonf(tt.expected, result, epsilon, fmt.Sprintf("Actual is: %v", result)) } }) } @@ -194,7 +194,7 @@ func TestLog(t *testing.T) { require.True(tt.err.Is(err)) } else { require.NoError(err) - require.InEpsilonf(tt.expected, result, epsilon, fmt.Sprintf("Actual is: %v", result), ) + require.InEpsilonf(tt.expected, result, epsilon, fmt.Sprintf("Actual is: %v", result)) } }) } diff --git a/sql/expression/function/lower_upper_test.go b/sql/expression/function/lower_upper_test.go index 57f7a7b65..e06dca8a9 100644 --- a/sql/expression/function/lower_upper_test.go +++ b/sql/expression/function/lower_upper_test.go @@ -3,9 +3,9 @@ package function import ( "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/expression" + "github.com/stretchr/testify/require" ) func TestLower(t *testing.T) { diff --git a/sql/expression/function/nullif_test.go b/sql/expression/function/nullif_test.go index a051a9dfd..c62284cbe 100644 --- a/sql/expression/function/nullif_test.go +++ b/sql/expression/function/nullif_test.go @@ -3,9 +3,9 @@ package function import ( "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/expression" + "github.com/stretchr/testify/require" ) func TestNullIf(t *testing.T) { diff --git a/sql/expression/function/reverse_repeat_replace_test.go b/sql/expression/function/reverse_repeat_replace_test.go index b18271a49..f04b16bc6 100644 --- a/sql/expression/function/reverse_repeat_replace_test.go +++ b/sql/expression/function/reverse_repeat_replace_test.go @@ -3,9 +3,9 @@ package function import ( "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/expression" + "github.com/stretchr/testify/require" ) func TestReverse(t *testing.T) { diff --git a/sql/expression/function/sleep.go b/sql/expression/function/sleep.go index 920b54cb5..230a9596f 100644 --- a/sql/expression/function/sleep.go +++ b/sql/expression/function/sleep.go @@ -3,9 +3,10 @@ package function import ( "context" "fmt" + "time" + "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/expression" - "time" ) // Sleep is a function that just waits for the specified number of seconds @@ -37,7 +38,7 @@ func (s *Sleep) Eval(ctx *sql.Context, row sql.Row) (interface{}, error) { return nil, err } - t := time.NewTimer(time.Duration(child.(float64) * 1000) * time.Millisecond) + t := time.NewTimer(time.Duration(child.(float64)*1000) * time.Millisecond) defer t.Stop() select { diff --git a/sql/expression/function/sleep_test.go b/sql/expression/function/sleep_test.go index 50187f312..65ce02478 100644 --- a/sql/expression/function/sleep_test.go +++ b/sql/expression/function/sleep_test.go @@ -4,9 +4,9 @@ import ( "testing" "time" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/expression" + "github.com/stretchr/testify/require" ) func TestSleep(t *testing.T) { diff --git a/sql/expression/function/soundex_test.go b/sql/expression/function/soundex_test.go index 4bada3a28..eb5739e56 100644 --- a/sql/expression/function/soundex_test.go +++ b/sql/expression/function/soundex_test.go @@ -3,9 +3,9 @@ package function import ( "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/expression" + "github.com/stretchr/testify/require" ) func TestSoundex(t *testing.T) { diff --git a/sql/expression/function/split_test.go b/sql/expression/function/split_test.go index f0162ed49..478d3b749 100644 --- a/sql/expression/function/split_test.go +++ b/sql/expression/function/split_test.go @@ -3,9 +3,9 @@ package function import ( "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/expression" + "github.com/stretchr/testify/require" ) func TestSplit(t *testing.T) { diff --git a/sql/expression/function/sqrt_power_test.go b/sql/expression/function/sqrt_power_test.go index 4d86a051c..c148a445b 100644 --- a/sql/expression/function/sqrt_power_test.go +++ b/sql/expression/function/sqrt_power_test.go @@ -1,12 +1,12 @@ package function import ( - "testing" "math" + "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/expression" + "github.com/stretchr/testify/require" ) func TestSqrt(t *testing.T) { diff --git a/sql/expression/function/substring_test.go b/sql/expression/function/substring_test.go index ef515b9e9..e24cbb13f 100644 --- a/sql/expression/function/substring_test.go +++ b/sql/expression/function/substring_test.go @@ -3,9 +3,9 @@ package function import ( "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/expression" + "github.com/stretchr/testify/require" ) func TestSubstring(t *testing.T) { diff --git a/sql/expression/function/time_test.go b/sql/expression/function/time_test.go index de6fdd758..b9762ec1f 100644 --- a/sql/expression/function/time_test.go +++ b/sql/expression/function/time_test.go @@ -4,9 +4,9 @@ import ( "testing" "time" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/expression" + "github.com/stretchr/testify/require" ) const ( diff --git a/sql/expression/function/tobase64_frombase64_test.go b/sql/expression/function/tobase64_frombase64_test.go index f214031d3..f234728d2 100644 --- a/sql/expression/function/tobase64_frombase64_test.go +++ b/sql/expression/function/tobase64_frombase64_test.go @@ -3,9 +3,9 @@ package function import ( "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/expression" + "github.com/stretchr/testify/require" ) func TestBase64(t *testing.T) { diff --git a/sql/expression/function/trim_ltrim_rtrim_test.go b/sql/expression/function/trim_ltrim_rtrim_test.go index 84edd2d94..abfaa9f4e 100644 --- a/sql/expression/function/trim_ltrim_rtrim_test.go +++ b/sql/expression/function/trim_ltrim_rtrim_test.go @@ -3,13 +3,13 @@ package function import ( "testing" - "github.com/src-d/go-mysql-server/sql/expression" "github.com/src-d/go-mysql-server/sql" + "github.com/src-d/go-mysql-server/sql/expression" "github.com/stretchr/testify/require" ) func TestTrim(t *testing.T) { - f := NewTrimFunc(bTrimType)(expression.NewGetField(0, sql.Text, "", false), ) + f := NewTrimFunc(bTrimType)(expression.NewGetField(0, sql.Text, "", false)) testCases := []struct { name string row sql.Row @@ -42,7 +42,7 @@ func TestTrim(t *testing.T) { } func TestLTrim(t *testing.T) { - f := NewTrimFunc(lTrimType)(expression.NewGetField(0, sql.Text, "", false), ) + f := NewTrimFunc(lTrimType)(expression.NewGetField(0, sql.Text, "", false)) testCases := []struct { name string row sql.Row @@ -75,7 +75,7 @@ func TestLTrim(t *testing.T) { } func TestRTrim(t *testing.T) { - f := NewTrimFunc(rTrimType)(expression.NewGetField(0, sql.Text, "", false), ) + f := NewTrimFunc(rTrimType)(expression.NewGetField(0, sql.Text, "", false)) testCases := []struct { name string row sql.Row diff --git a/sql/expression/function/version_test.go b/sql/expression/function/version_test.go index 05989eb59..0ec10cfdb 100644 --- a/sql/expression/function/version_test.go +++ b/sql/expression/function/version_test.go @@ -3,8 +3,8 @@ package function import ( "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/sql" + "github.com/stretchr/testify/require" ) const versionPostfix = "test" diff --git a/sql/expression/interval_test.go b/sql/expression/interval_test.go index c19a833c4..24be71a5a 100644 --- a/sql/expression/interval_test.go +++ b/sql/expression/interval_test.go @@ -4,8 +4,8 @@ import ( "testing" "time" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/sql" + "github.com/stretchr/testify/require" ) func TestTimeDelta(t *testing.T) { diff --git a/sql/expression/istrue_test.go b/sql/expression/istrue_test.go index 83fe1e710..0cc4e41d1 100644 --- a/sql/expression/istrue_test.go +++ b/sql/expression/istrue_test.go @@ -82,4 +82,4 @@ func TestIsFalse(t *testing.T) { require.Equal(true, eval(t, e, sql.NewRow(""))) require.Equal(true, eval(t, e, sql.NewRow("false"))) require.Equal(true, eval(t, e, sql.NewRow("true"))) -} \ No newline at end of file +} diff --git a/sql/expression/like_test.go b/sql/expression/like_test.go index 22c47c1c9..0f5dcae9b 100644 --- a/sql/expression/like_test.go +++ b/sql/expression/like_test.go @@ -4,8 +4,8 @@ import ( "fmt" "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/sql" + "github.com/stretchr/testify/require" ) func TestPatternToRegex(t *testing.T) { diff --git a/sql/expression/logic_test.go b/sql/expression/logic_test.go index 3828f95a2..b71c71b7e 100644 --- a/sql/expression/logic_test.go +++ b/sql/expression/logic_test.go @@ -3,8 +3,8 @@ package expression import ( "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/sql" + "github.com/stretchr/testify/require" ) func TestAnd(t *testing.T) { diff --git a/sql/expression/unresolved_test.go b/sql/expression/unresolved_test.go index 61db6ffb5..f4b451b3e 100644 --- a/sql/expression/unresolved_test.go +++ b/sql/expression/unresolved_test.go @@ -3,8 +3,8 @@ package expression import ( "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/sql" + "github.com/stretchr/testify/require" ) func TestUnresolvedExpression(t *testing.T) { diff --git a/sql/expression/walk_test.go b/sql/expression/walk_test.go index 25488bb56..afbf4d7ad 100644 --- a/sql/expression/walk_test.go +++ b/sql/expression/walk_test.go @@ -3,8 +3,8 @@ package expression import ( "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/sql" + "github.com/stretchr/testify/require" ) func TestWalk(t *testing.T) { diff --git a/sql/functionregistry_test.go b/sql/functionregistry_test.go index 846bea792..d60042331 100644 --- a/sql/functionregistry_test.go +++ b/sql/functionregistry_test.go @@ -3,9 +3,9 @@ package sql_test import ( "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/expression" + "github.com/stretchr/testify/require" ) func TestFunctionRegistry(t *testing.T) { diff --git a/sql/index/pilosa/driver_test.go b/sql/index/pilosa/driver_test.go index be7edbb03..e3bad20e4 100644 --- a/sql/index/pilosa/driver_test.go +++ b/sql/index/pilosa/driver_test.go @@ -11,10 +11,10 @@ import ( "time" "github.com/pilosa/pilosa" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/expression" "github.com/src-d/go-mysql-server/test" + "github.com/stretchr/testify/require" ) var tmpDir string diff --git a/sql/index/pilosa/index.go b/sql/index/pilosa/index.go index 54d0c1fe6..a9384c757 100644 --- a/sql/index/pilosa/index.go +++ b/sql/index/pilosa/index.go @@ -5,9 +5,9 @@ import ( "sync" "github.com/pilosa/pilosa" - errors "gopkg.in/src-d/go-errors.v1" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/index" + errors "gopkg.in/src-d/go-errors.v1" ) // concurrentPilosaIndex is a wrapper of pilosa.Index that can be opened and closed diff --git a/sql/index/pilosa/lookup.go b/sql/index/pilosa/lookup.go index 8c6daf8e7..3e11fe65c 100644 --- a/sql/index/pilosa/lookup.go +++ b/sql/index/pilosa/lookup.go @@ -9,8 +9,8 @@ import ( "time" "github.com/pilosa/pilosa" - errors "gopkg.in/src-d/go-errors.v1" "github.com/src-d/go-mysql-server/sql" + errors "gopkg.in/src-d/go-errors.v1" ) var ( diff --git a/sql/index/pilosa/lookup_test.go b/sql/index/pilosa/lookup_test.go index 3f2316826..28e30b5cc 100644 --- a/sql/index/pilosa/lookup_test.go +++ b/sql/index/pilosa/lookup_test.go @@ -9,9 +9,9 @@ import ( "time" "github.com/pilosa/pilosa" + "github.com/src-d/go-mysql-server/sql" "github.com/stretchr/testify/require" errors "gopkg.in/src-d/go-errors.v1" - "github.com/src-d/go-mysql-server/sql" ) func TestCompare(t *testing.T) { diff --git a/sql/index/pilosa/mapping.go b/sql/index/pilosa/mapping.go index 949d49989..004332218 100644 --- a/sql/index/pilosa/mapping.go +++ b/sql/index/pilosa/mapping.go @@ -9,8 +9,8 @@ import ( "sort" "sync" - bolt "go.etcd.io/bbolt" "github.com/src-d/go-mysql-server/sql" + bolt "go.etcd.io/bbolt" ) // mapping diff --git a/sql/parse/describe.go b/sql/parse/describe.go index 5fd0d4eae..e7993d49b 100644 --- a/sql/parse/describe.go +++ b/sql/parse/describe.go @@ -4,9 +4,9 @@ import ( "bufio" "strings" - errors "gopkg.in/src-d/go-errors.v1" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/plan" + errors "gopkg.in/src-d/go-errors.v1" ) var ( diff --git a/sql/parse/describe_test.go b/sql/parse/describe_test.go index e6998947c..c15b6af00 100644 --- a/sql/parse/describe_test.go +++ b/sql/parse/describe_test.go @@ -3,11 +3,11 @@ package parse import ( "testing" - "github.com/stretchr/testify/require" - errors "gopkg.in/src-d/go-errors.v1" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/expression" "github.com/src-d/go-mysql-server/sql/plan" + "github.com/stretchr/testify/require" + errors "gopkg.in/src-d/go-errors.v1" ) func TestParseDescribeQuery(t *testing.T) { diff --git a/sql/parse/indexes_test.go b/sql/parse/indexes_test.go index 833be6bd3..4072b7a5d 100644 --- a/sql/parse/indexes_test.go +++ b/sql/parse/indexes_test.go @@ -8,9 +8,9 @@ import ( "github.com/src-d/go-mysql-server/sql/expression" "github.com/src-d/go-mysql-server/sql/plan" + "github.com/src-d/go-mysql-server/sql" "github.com/stretchr/testify/require" errors "gopkg.in/src-d/go-errors.v1" - "github.com/src-d/go-mysql-server/sql" ) func TestParseCreateIndex(t *testing.T) { diff --git a/sql/parse/show_create.go b/sql/parse/show_create.go index 3b96480b8..028b6024f 100644 --- a/sql/parse/show_create.go +++ b/sql/parse/show_create.go @@ -5,9 +5,9 @@ import ( "io" "strings" - "gopkg.in/src-d/go-errors.v1" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/plan" + "gopkg.in/src-d/go-errors.v1" ) var errUnsupportedShowCreateQuery = errors.NewKind("Unsupported query: SHOW CREATE %s") diff --git a/sql/parse/show_create_test.go b/sql/parse/show_create_test.go index be52a64ea..3831fc0fb 100644 --- a/sql/parse/show_create_test.go +++ b/sql/parse/show_create_test.go @@ -3,10 +3,10 @@ package parse import ( "testing" - "github.com/stretchr/testify/require" - "gopkg.in/src-d/go-errors.v1" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/plan" + "github.com/stretchr/testify/require" + "gopkg.in/src-d/go-errors.v1" ) func TestParseShowCreateTableQuery(t *testing.T) { diff --git a/sql/parse/util.go b/sql/parse/util.go index 095d75c74..a99e7a76c 100644 --- a/sql/parse/util.go +++ b/sql/parse/util.go @@ -9,8 +9,8 @@ import ( "strings" "unicode" - errors "gopkg.in/src-d/go-errors.v1" "github.com/src-d/go-mysql-server/sql" + errors "gopkg.in/src-d/go-errors.v1" "vitess.io/vitess/go/vt/sqlparser" ) diff --git a/sql/parse/warnings.go b/sql/parse/warnings.go index 4e0a16002..9c88a3fd8 100644 --- a/sql/parse/warnings.go +++ b/sql/parse/warnings.go @@ -5,9 +5,9 @@ import ( "strconv" "strings" - errors "gopkg.in/src-d/go-errors.v1" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/plan" + errors "gopkg.in/src-d/go-errors.v1" ) var errInvalidIndex = errors.NewKind("invalid %s index %d (index must be non-negative)") diff --git a/sql/plan/common_test.go b/sql/plan/common_test.go index 35043f7fd..483a0324c 100644 --- a/sql/plan/common_test.go +++ b/sql/plan/common_test.go @@ -6,9 +6,9 @@ import ( "io" "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/memory" "github.com/src-d/go-mysql-server/sql" + "github.com/stretchr/testify/require" ) var benchtable = func() *memory.Table { diff --git a/sql/plan/ddl_test.go b/sql/plan/ddl_test.go index 8347cb925..a644857e9 100644 --- a/sql/plan/ddl_test.go +++ b/sql/plan/ddl_test.go @@ -4,9 +4,9 @@ import ( "io" "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/memory" "github.com/src-d/go-mysql-server/sql" + "github.com/stretchr/testify/require" ) func TestCreateTable(t *testing.T) { diff --git a/sql/plan/describe_test.go b/sql/plan/describe_test.go index 157bfff61..18c0b9f84 100644 --- a/sql/plan/describe_test.go +++ b/sql/plan/describe_test.go @@ -4,10 +4,10 @@ import ( "io" "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/memory" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/expression" + "github.com/stretchr/testify/require" ) func TestDescribe(t *testing.T) { diff --git a/sql/plan/drop_index_test.go b/sql/plan/drop_index_test.go index f90dc9568..cd2e214fe 100644 --- a/sql/plan/drop_index_test.go +++ b/sql/plan/drop_index_test.go @@ -4,10 +4,10 @@ import ( "testing" "time" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/memory" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/expression" + "github.com/stretchr/testify/require" ) func TestDeleteIndex(t *testing.T) { diff --git a/sql/plan/filter_test.go b/sql/plan/filter_test.go index ea031831b..de5912fe7 100644 --- a/sql/plan/filter_test.go +++ b/sql/plan/filter_test.go @@ -3,10 +3,10 @@ package plan import ( "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/memory" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/expression" + "github.com/stretchr/testify/require" ) func TestFilter(t *testing.T) { diff --git a/sql/plan/group_by_test.go b/sql/plan/group_by_test.go index 34ce7c95f..69bbb83a5 100644 --- a/sql/plan/group_by_test.go +++ b/sql/plan/group_by_test.go @@ -3,11 +3,11 @@ package plan import ( "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/memory" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/expression" "github.com/src-d/go-mysql-server/sql/expression/function/aggregation" + "github.com/stretchr/testify/require" ) func TestGroupBySchema(t *testing.T) { diff --git a/sql/plan/having_test.go b/sql/plan/having_test.go index e4b90ccc7..9651a631a 100644 --- a/sql/plan/having_test.go +++ b/sql/plan/having_test.go @@ -3,10 +3,10 @@ package plan import ( "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/memory" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/expression" + "github.com/stretchr/testify/require" ) func TestHaving(t *testing.T) { diff --git a/sql/plan/lock_test.go b/sql/plan/lock_test.go index 3df237f87..63b806420 100644 --- a/sql/plan/lock_test.go +++ b/sql/plan/lock_test.go @@ -3,9 +3,9 @@ package plan import ( "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/memory" "github.com/src-d/go-mysql-server/sql" + "github.com/stretchr/testify/require" ) func TestLockTables(t *testing.T) { diff --git a/sql/plan/offset_test.go b/sql/plan/offset_test.go index be0d7de8d..607905536 100644 --- a/sql/plan/offset_test.go +++ b/sql/plan/offset_test.go @@ -3,8 +3,8 @@ package plan import ( "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/sql" + "github.com/stretchr/testify/require" ) func TestOffsetPlan(t *testing.T) { diff --git a/sql/plan/process_test.go b/sql/plan/process_test.go index 881b775a2..2d4e65763 100644 --- a/sql/plan/process_test.go +++ b/sql/plan/process_test.go @@ -4,10 +4,10 @@ import ( "io" "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/memory" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/expression" + "github.com/stretchr/testify/require" ) func TestQueryProcess(t *testing.T) { diff --git a/sql/plan/processlist_test.go b/sql/plan/processlist_test.go index f0ec002dd..401661ba2 100644 --- a/sql/plan/processlist_test.go +++ b/sql/plan/processlist_test.go @@ -4,8 +4,8 @@ import ( "context" "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/sql" + "github.com/stretchr/testify/require" ) func TestShowProcessList(t *testing.T) { diff --git a/sql/plan/resolved_table_test.go b/sql/plan/resolved_table_test.go index cd8a2ef59..a90670468 100644 --- a/sql/plan/resolved_table_test.go +++ b/sql/plan/resolved_table_test.go @@ -6,8 +6,8 @@ import ( "io" "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/sql" + "github.com/stretchr/testify/require" ) func TestResolvedTable(t *testing.T) { diff --git a/sql/plan/set_test.go b/sql/plan/set_test.go index 5282ecd83..4af46b00e 100644 --- a/sql/plan/set_test.go +++ b/sql/plan/set_test.go @@ -4,9 +4,9 @@ import ( "context" "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/expression" + "github.com/stretchr/testify/require" ) func TestSet(t *testing.T) { diff --git a/sql/plan/show_create_database_test.go b/sql/plan/show_create_database_test.go index 9c42b3385..c58fa065c 100644 --- a/sql/plan/show_create_database_test.go +++ b/sql/plan/show_create_database_test.go @@ -3,8 +3,8 @@ package plan import ( "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/sql" + "github.com/stretchr/testify/require" ) func TestShowCreateDatabase(t *testing.T) { diff --git a/sql/plan/show_create_table_test.go b/sql/plan/show_create_table_test.go index 39ac5ac31..d380bfa29 100644 --- a/sql/plan/show_create_table_test.go +++ b/sql/plan/show_create_table_test.go @@ -3,9 +3,9 @@ package plan import ( "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/memory" "github.com/src-d/go-mysql-server/sql" + "github.com/stretchr/testify/require" ) func TestShowCreateTable(t *testing.T) { diff --git a/sql/plan/show_indexes_test.go b/sql/plan/show_indexes_test.go index fde696a08..8ca0649e2 100644 --- a/sql/plan/show_indexes_test.go +++ b/sql/plan/show_indexes_test.go @@ -3,10 +3,10 @@ package plan import ( "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/memory" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/expression" + "github.com/stretchr/testify/require" ) func TestShowIndexes(t *testing.T) { diff --git a/sql/plan/show_tables_test.go b/sql/plan/show_tables_test.go index b9a48f562..153c91c50 100644 --- a/sql/plan/show_tables_test.go +++ b/sql/plan/show_tables_test.go @@ -4,9 +4,9 @@ import ( "io" "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/memory" "github.com/src-d/go-mysql-server/sql" + "github.com/stretchr/testify/require" ) func TestShowTables(t *testing.T) { diff --git a/sql/plan/showcolumns_test.go b/sql/plan/showcolumns_test.go index acb245a37..696627247 100644 --- a/sql/plan/showcolumns_test.go +++ b/sql/plan/showcolumns_test.go @@ -3,9 +3,9 @@ package plan import ( "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/memory" "github.com/src-d/go-mysql-server/sql" + "github.com/stretchr/testify/require" ) func TestShowColumns(t *testing.T) { diff --git a/sql/plan/showtablestatus_test.go b/sql/plan/showtablestatus_test.go index 83bc4d863..7852409a9 100644 --- a/sql/plan/showtablestatus_test.go +++ b/sql/plan/showtablestatus_test.go @@ -3,9 +3,9 @@ package plan import ( "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/memory" "github.com/src-d/go-mysql-server/sql" + "github.com/stretchr/testify/require" ) func TestShowTableStatus(t *testing.T) { diff --git a/sql/plan/showvariables_test.go b/sql/plan/showvariables_test.go index bb852dce0..1abbc7b96 100644 --- a/sql/plan/showvariables_test.go +++ b/sql/plan/showvariables_test.go @@ -4,8 +4,8 @@ import ( "io" "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/sql" + "github.com/stretchr/testify/require" ) func TestShowVariables(t *testing.T) { diff --git a/sql/plan/showwarnings_test.go b/sql/plan/showwarnings_test.go index 67dfee6e8..480cc7726 100644 --- a/sql/plan/showwarnings_test.go +++ b/sql/plan/showwarnings_test.go @@ -4,8 +4,8 @@ import ( "io" "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/sql" + "github.com/stretchr/testify/require" ) func TestShowWarnings(t *testing.T) { diff --git a/sql/plan/subqueryalias_test.go b/sql/plan/subqueryalias_test.go index ad5c23de6..90c538e7f 100644 --- a/sql/plan/subqueryalias_test.go +++ b/sql/plan/subqueryalias_test.go @@ -3,10 +3,10 @@ package plan import ( "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/memory" "github.com/src-d/go-mysql-server/sql" "github.com/src-d/go-mysql-server/sql/expression" + "github.com/stretchr/testify/require" ) func TestSubqueryAliasSchema(t *testing.T) { diff --git a/sql/plan/tablealias_test.go b/sql/plan/tablealias_test.go index cd7253472..aee4d83c0 100644 --- a/sql/plan/tablealias_test.go +++ b/sql/plan/tablealias_test.go @@ -4,9 +4,9 @@ import ( "io" "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/memory" "github.com/src-d/go-mysql-server/sql" + "github.com/stretchr/testify/require" ) func TestTableAlias(t *testing.T) { diff --git a/sql/plan/unresolved_test.go b/sql/plan/unresolved_test.go index 662c578cb..3865fe40e 100644 --- a/sql/plan/unresolved_test.go +++ b/sql/plan/unresolved_test.go @@ -3,8 +3,8 @@ package plan import ( "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/sql" + "github.com/stretchr/testify/require" ) func TestUnresolvedTable(t *testing.T) { diff --git a/sql/plan/walk_test.go b/sql/plan/walk_test.go index dda866de2..a07230d96 100644 --- a/sql/plan/walk_test.go +++ b/sql/plan/walk_test.go @@ -3,8 +3,8 @@ package plan import ( "testing" - "github.com/stretchr/testify/require" "github.com/src-d/go-mysql-server/sql" + "github.com/stretchr/testify/require" ) func TestWalk(t *testing.T) {