diff --git a/modules/cabana/mail_routes.go b/modules/cabana/mail_routes.go index b4d4533e..5e5cc108 100644 --- a/modules/cabana/mail_routes.go +++ b/modules/cabana/mail_routes.go @@ -38,7 +38,7 @@ type AdminMailImagesMeta struct { // AdminMailImagesResponse is the GET /mail/images answer (custom meta). type AdminMailImagesResponse struct { - Data []AdminMailImage `json:"data"` + Data []AdminMailImage `json:"data"` Meta AdminMailImagesMeta `json:"meta"` } @@ -706,8 +706,8 @@ func (s *service) mailTestAttempt(adminID uint) (allowed bool, retryAfter time.D var mailTestLocal = newMailTestWindow() type mailTestWindow struct { - mu sync.Mutex - by map[string]mailTestBucket + mu sync.Mutex + by map[string]mailTestBucket } type mailTestBucket struct { diff --git a/modules/postcard/store_postgres_test.go b/modules/postcard/store_postgres_test.go index 5c0722da..e6597785 100644 --- a/modules/postcard/store_postgres_test.go +++ b/modules/postcard/store_postgres_test.go @@ -120,7 +120,7 @@ func TestSync(t *testing.T) { }) t.Run("database_only_layouts_untouched", func(t *testing.T) { - if err := gdb.Exec(`INSERT INTO `+LayoutsTable+` (code, source, name, content_html, is_custom) VALUES ('promo', NULL, 'Promo', '
{{ .Content }}
', TRUE) + if err := gdb.Exec(`INSERT INTO ` + LayoutsTable + ` (code, source, name, content_html, is_custom) VALUES ('promo', NULL, 'Promo', '
{{ .Content }}
', TRUE) ON CONFLICT (code) DO UPDATE SET name = EXCLUDED.name`).Error; err != nil { t.Fatal(err) } @@ -153,7 +153,7 @@ ON CONFLICT (code) DO UPDATE SET name = EXCLUDED.name`).Error; err != nil { if subject == "Custom" { t.Fatalf("subject still %q after reset", subject) } - if err := gdb.Exec(`INSERT INTO `+LayoutsTable+` (code, source, name, content_html, is_custom) VALUES ('promo2', NULL, 'Promo2', 'x', TRUE) + if err := gdb.Exec(`INSERT INTO ` + LayoutsTable + ` (code, source, name, content_html, is_custom) VALUES ('promo2', NULL, 'Promo2', 'x', TRUE) ON CONFLICT (code) DO NOTHING`).Error; err != nil { t.Fatal(err) }