Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
lestrrat committed Jan 14, 2017
1 parent 4a72df8 commit 8904c28
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
6 changes: 4 additions & 2 deletions internal/cmd/gencoltypes/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@ func _main() error {

buf.WriteString(`// generated by internal/cmd/gentokens/main.go`)
buf.WriteString("\n\npackage model")
buf.WriteString("\n\ntype ColumnType int")
buf.WriteString("\n\nconst (")
buf.WriteString("\n\n// ColumnType describes the possible types that a column may take")
buf.WriteString("\ntype ColumnType int")
buf.WriteString("\n\n// List of possible ColumnType values")
buf.WriteString("\nconst (")
for i, typ := range types {
buf.WriteString("\nColumnType")
buf.WriteString(typ)
Expand Down
2 changes: 2 additions & 0 deletions model/columns.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

package model

// ColumnType describes the possible types that a column may take
type ColumnType int

// List of possible ColumnType values
const (
ColumnTypeInvalid ColumnType = iota
ColumnTypeBit
Expand Down
8 changes: 4 additions & 4 deletions model/interface_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import "testing"

func TestInterfaces(t *testing.T) {
{
var stmt Index = &index{}
_ = stmt
var stmt Index
stmt = &index{}
}
{
var stmt TableColumn = &tablecol{}
_ = stmt
var stmt TableColumn
stmt= &tablecol{}
}
}

0 comments on commit 8904c28

Please sign in to comment.