Skip to content

Commit 167cfe5

Browse files
authored
gofmt + goimports (#33)
1 parent c429777 commit 167cfe5

20 files changed

+31
-17
lines changed

cmd/gitql/query.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ package main
33
import (
44
"errors"
55
"fmt"
6+
"io"
67
"os"
78
"path/filepath"
89

10+
"github.com/gitql/gitql"
911
gitqlgit "github.com/gitql/gitql/git"
1012
"github.com/gitql/gitql/sql"
1113

12-
"gopkg.in/src-d/go-git.v4"
13-
"github.com/gitql/gitql"
14-
"io"
1514
"github.com/olekukonko/tablewriter"
15+
"gopkg.in/src-d/go-git.v4"
1616
)
1717

1818
type CmdQuery struct {

engine.go

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

6+
"github.com/gitql/gitql/sql"
67
"github.com/gitql/gitql/sql/analyzer"
78
"github.com/gitql/gitql/sql/parse"
8-
"github.com/gitql/gitql/sql"
99
)
1010

1111
type Engine struct {

engine_test.go

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

33
import (
4-
"testing"
54
"io"
5+
"testing"
66

7-
"github.com/stretchr/testify/require"
8-
"github.com/gitql/gitql/sql"
9-
"github.com/gitql/gitql/mem"
107
"github.com/gitql/gitql"
8+
"github.com/gitql/gitql/mem"
9+
"github.com/gitql/gitql/sql"
10+
11+
"github.com/stretchr/testify/require"
1112
)
1213

1314
func TestEngine_Query(t *testing.T) {
@@ -46,4 +47,3 @@ func TestEngine_Query(t *testing.T) {
4647
assert.Equal(sql.NewMemoryRow(int32(2)), results[1])
4748
assert.Equal(sql.NewMemoryRow(int32(3)), results[2])
4849
}
49-

mem/database.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ type Database struct {
99

1010
func NewDatabase(name string) *Database {
1111
return &Database{
12-
name: name,
12+
name: name,
1313
tables: map[string]sql.PhysicalRelation{},
1414
}
1515
}

mem/database_test.go

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

6-
"github.com/stretchr/testify/assert"
76
"github.com/gitql/gitql/sql"
7+
8+
"github.com/stretchr/testify/assert"
89
)
910

1011
func TestDatabase_Name(t *testing.T) {

mem/table_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ import (
44
"io"
55
"testing"
66

7-
"github.com/stretchr/testify/assert"
87
"github.com/gitql/gitql/sql"
8+
9+
"github.com/stretchr/testify/assert"
910
)
1011

1112
func TestTable_Name(t *testing.T) {

sql/analyzer/analyzer_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"github.com/gitql/gitql/sql/analyzer"
1010
"github.com/gitql/gitql/sql/expression"
1111
"github.com/gitql/gitql/sql/plan"
12+
1213
"github.com/stretchr/testify/require"
1314
)
1415

@@ -19,7 +20,7 @@ func TestAnalyzer_Analyze(t *testing.T) {
1920
db := mem.NewDatabase("mydb")
2021
db.AddTable("mytable", table)
2122

22-
catalog := &sql.Catalog{Databases:[]sql.Database{db}}
23+
catalog := &sql.Catalog{Databases: []sql.Database{db}}
2324
a := analyzer.New(catalog)
2425
a.CurrentDatabase = "mydb"
2526

sql/analyzer/rules_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"github.com/gitql/gitql/sql/analyzer"
99
"github.com/gitql/gitql/sql/expression"
1010
"github.com/gitql/gitql/sql/plan"
11+
1112
"github.com/stretchr/testify/assert"
1213
)
1314

@@ -20,7 +21,7 @@ func Test_resolveTables(t *testing.T) {
2021
db := mem.NewDatabase("mydb")
2122
db.AddTable("mytable", table)
2223

23-
catalog := &sql.Catalog{Databases:[]sql.Database{db}}
24+
catalog := &sql.Catalog{Databases: []sql.Database{db}}
2425

2526
a := analyzer.New(catalog)
2627
a.Rules = []analyzer.Rule{f}
@@ -48,7 +49,7 @@ func Test_resolveTables_Nested(t *testing.T) {
4849
db := mem.NewDatabase("mydb")
4950
db.AddTable("mytable", table)
5051

51-
catalog := &sql.Catalog{Databases:[]sql.Database{db}}
52+
catalog := &sql.Catalog{Databases: []sql.Database{db}}
5253

5354
a := analyzer.New(catalog)
5455
a.Rules = []analyzer.Rule{f}

sql/expression/comparison_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"testing"
55

66
"github.com/gitql/gitql/sql"
7+
78
"github.com/stretchr/testify/require"
89
)
910

sql/expression/star_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"testing"
55

66
"github.com/gitql/gitql/sql"
7+
78
"github.com/stretchr/testify/assert"
89
)
910

0 commit comments

Comments
 (0)