Missed some more gofmt -s

This commit is contained in:
Aaron L 2016-08-08 00:47:33 -07:00
parent 81d3e15aa9
commit 58d3dcff48
2 changed files with 10 additions and 10 deletions

View file

@ -53,7 +53,7 @@ func TestGetColumnMissing(t *testing.T) {
table := Table{
Columns: []Column{
Column{Name: "one"},
{Name: "one"},
},
}

View file

@ -16,18 +16,18 @@ func (fakeDB) TableNames() ([]string, error) {
}
func (fakeDB) Columns(tableName string) ([]bdb.Column, error) {
return map[string][]bdb.Column{
"users": []bdb.Column{{Name: "id", Type: "int32"}},
"contests": []bdb.Column{{Name: "id", Type: "int32", Nullable: true}},
"videos": []bdb.Column{
"users": {{Name: "id", Type: "int32"}},
"contests": {{Name: "id", Type: "int32", Nullable: true}},
"videos": {
{Name: "id", Type: "int32"},
{Name: "user_id", Type: "int32", Nullable: true, Unique: true},
{Name: "contest_id", Type: "int32"},
},
"notifications": []bdb.Column{
"notifications": {
{Name: "user_id", Type: "int32"},
{Name: "source_id", Type: "int32", Nullable: true},
},
"users_videos_tags": []bdb.Column{
"users_videos_tags": {
{Name: "user_id", Type: "int32"},
{Name: "video_id", Type: "int32"},
},
@ -35,15 +35,15 @@ func (fakeDB) Columns(tableName string) ([]bdb.Column, error) {
}
func (fakeDB) ForeignKeyInfo(tableName string) ([]bdb.ForeignKey, error) {
return map[string][]bdb.ForeignKey{
"videos": []bdb.ForeignKey{
"videos": {
{Name: "videos_user_id_fk", Column: "user_id", ForeignTable: "users", ForeignColumn: "id"},
{Name: "videos_contest_id_fk", Column: "contest_id", ForeignTable: "contests", ForeignColumn: "id"},
},
"notifications": []bdb.ForeignKey{
"notifications": {
{Name: "notifications_user_id_fk", Column: "user_id", ForeignTable: "users", ForeignColumn: "id"},
{Name: "notifications_source_id_fk", Column: "source_id", ForeignTable: "users", ForeignColumn: "id"},
},
"users_videos_tags": []bdb.ForeignKey{
"users_videos_tags": {
{Name: "user_id_fk", Column: "user_id", ForeignTable: "users", ForeignColumn: "id"},
{Name: "video_id_fk", Column: "video_id", ForeignTable: "videos", ForeignColumn: "id"},
},
@ -57,7 +57,7 @@ func (fakeDB) TranslateColumnType(c bdb.Column) bdb.Column {
}
func (fakeDB) PrimaryKeyInfo(tableName string) (*bdb.PrimaryKey, error) {
return map[string]*bdb.PrimaryKey{
"users_videos_tags": &bdb.PrimaryKey{
"users_videos_tags": {
Name: "user_video_id_pkey",
Columns: []string{"user_id", "video_id"},
},