Skip to content

Commit

Permalink
*: pass go vet
Browse files Browse the repository at this point in the history
pass go vet
  • Loading branch information
zimulala committed Sep 6, 2015
1 parent 1ac7e63 commit 9238a23
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion domain/domain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ type testSuite struct {
}

func (*testSuite) TestT(c *C) {
driver := localstore.Driver{goleveldb.MemoryDriver{}}
driver := localstore.Driver{Driver: goleveldb.MemoryDriver{}}
store, err := driver.Open("memory")
c.Assert(err, IsNil)
defer store.Close()
Expand Down
10 changes: 5 additions & 5 deletions field/result_field_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ type testResultFieldSuite struct {

func (*testResultFieldSuite) TestMain(c *C) {
col := column.Col{
model.ColumnInfo{
ColumnInfo: model.ColumnInfo{
FieldType: *types.NewFieldType(mysql.TypeLong),
Name: model.NewCIStr("c1"),
},
Expand All @@ -53,7 +53,7 @@ func (*testResultFieldSuite) TestMain(c *C) {
c.Assert(r.String(), Equals, cr.String())

col1 := column.Col{
model.ColumnInfo{
ColumnInfo: model.ColumnInfo{
FieldType: *types.NewFieldType(mysql.TypeLong),
Name: model.NewCIStr("c2"),
},
Expand All @@ -75,14 +75,14 @@ func (*testResultFieldSuite) TestMain(c *C) {
c.Assert(ns[1], Equals, "\"c2\"")

col2 := column.Col{
model.ColumnInfo{
ColumnInfo: model.ColumnInfo{
FieldType: *types.NewFieldType(mysql.TypeVarchar),
Name: model.NewCIStr("c3"),
},
}
col2.Flag |= mysql.UnsignedFlag
col3 := column.Col{
model.ColumnInfo{
ColumnInfo: model.ColumnInfo{
FieldType: *types.NewFieldType(mysql.TypeBlob),
Name: model.NewCIStr("c4"),
},
Expand All @@ -100,7 +100,7 @@ func (*testResultFieldSuite) TestMain(c *C) {
c.Assert(err, IsNil)

col4 := column.Col{
model.ColumnInfo{
ColumnInfo: model.ColumnInfo{
FieldType: *types.NewFieldType(mysql.TypeVarchar),
Name: model.NewCIStr("c2"),
},
Expand Down
2 changes: 1 addition & 1 deletion infoschema/infoschema_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ type testSuite struct {
func (*testSuite) TestT(c *C) {
table.TableFromMeta = tables.TableFromMeta

driver := localstore.Driver{goleveldb.MemoryDriver{}}
driver := localstore.Driver{Driver: goleveldb.MemoryDriver{}}
store, err := driver.Open("memory")
c.Assert(err, IsNil)
defer store.Close()
Expand Down
Binary file added meta/autoid/.autoid_test.go.swp
Binary file not shown.
2 changes: 1 addition & 1 deletion meta/autoid/autoid_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ type testSuite struct {
}

func (*testSuite) TestT(c *C) {
driver := localstore.Driver{goleveldb.MemoryDriver{}}
driver := localstore.Driver{Driver: goleveldb.MemoryDriver{}}
store, err := driver.Open("memory")
c.Assert(err, IsNil)
defer store.Close()
Expand Down
2 changes: 1 addition & 1 deletion meta/meta_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ type testSuite struct {
}

func (*testSuite) TestT(c *C) {
driver := localstore.Driver{goleveldb.MemoryDriver{}}
driver := localstore.Driver{Driver: goleveldb.MemoryDriver{}}
store, err := driver.Open("memory")
c.Assert(err, IsNil)
defer store.Close()
Expand Down
4 changes: 2 additions & 2 deletions tidb.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ func runExecute(ctx context.Context, es *stmts.ExecuteStmt, args ...interface{})
if len(args) > 0 {
es.UsingVars = make([]expression.Expression, 0, len(args))
for _, v := range args {
var exp expression.Expression = &expressions.Value{v}
var exp expression.Expression = &expressions.Value{Val: v}
es.UsingVars = append(es.UsingVars, exp)
}
}
Expand Down Expand Up @@ -209,7 +209,7 @@ func RegisterStore(name string, driver kv.Driver) error {

// RegisterLocalStore registers a local kv storage with unique name and its associated engine Driver.
func RegisterLocalStore(name string, driver engine.Driver) error {
d := localstore.Driver{driver}
d := localstore.Driver{Driver: driver}
return RegisterStore(name, d)
}

Expand Down

0 comments on commit 9238a23

Please sign in to comment.