Skip to content

High performance, self-hosted, newsletter and mailing list manager with a modern dashboard. Single binary app.

Fix typo and formatting (#2028)

Vinoth Kumard7fe13c4b90e
diff --git a/cmd/handlers.go b/cmd/handlers.go
index 51b7fb77..b031953b 100644
--- a/cmd/handlers.go
+++ b/cmd/handlers.go
@@ -72,8 +72,8 @@ func initHTTPHandlers(e *echo.Echo, app *App) {
})
g.GET(path.Join(adminRoot, ""), handleAdminPage)
- g.GET(path.Join(adminRoot, "/custom.css"), serveCustomApperance("admin.custom_css"))
- g.GET(path.Join(adminRoot, "/custom.js"), serveCustomApperance("admin.custom_js"))
+ g.GET(path.Join(adminRoot, "/custom.css"), serveCustomAppearance("admin.custom_css"))
+ g.GET(path.Join(adminRoot, "/custom.js"), serveCustomAppearance("admin.custom_js"))
g.GET(path.Join(adminRoot, "/*"), handleAdminPage)
// API endpoints.
@@ -210,8 +210,8 @@ func initHTTPHandlers(e *echo.Echo, app *App) {
e.GET("/archive/latest", handleCampaignArchivePageLatest)
}
- e.GET("/public/custom.css", serveCustomApperance("public.custom_css"))
- e.GET("/public/custom.js", serveCustomApperance("public.custom_js"))
+ e.GET("/public/custom.css", serveCustomAppearance("public.custom_css"))
+ e.GET("/public/custom.js", serveCustomAppearance("public.custom_js"))
// Public health API endpoint.
e.GET("/health", handleHealthCheck)
@@ -248,9 +248,9 @@ func handleHealthCheck(c echo.Context) error {
return c.JSON(http.StatusOK, okResp{true})
}
-// serveCustomApperance serves the given custom CSS/JS appearance blob
+// serveCustomAppearance serves the given custom CSS/JS appearance blob
// meant for customizing public and admin pages from the admin settings UI.
-func serveCustomApperance(name string) echo.HandlerFunc {
+func serveCustomAppearance(name string) echo.HandlerFunc {
return func(c echo.Context) error {
var (
app = c.Get("app").(*App)
diff --git a/cmd/import.go b/cmd/import.go
index 42dde37c..f4ae7eca 100644
--- a/cmd/import.go
+++ b/cmd/import.go
@@ -3,8 +3,8 @@ package main
import (
"encoding/json"
"io"
- "os"
"net/http"
+ "os"
"strings"
"github.com/knadh/listmonk/internal/subimporter"
diff --git a/internal/core/bounces.go b/internal/core/bounces.go
index ae2b7c47..0e080020 100644
--- a/internal/core/bounces.go
+++ b/internal/core/bounces.go
@@ -1,7 +1,6 @@
package core
import (
- "fmt"
"net/http"
"strings"
diff --git a/internal/messenger/email/email.go b/internal/messenger/email/email.go
index ed688431..73e320de 100644
--- a/internal/messenger/email/email.go
+++ b/internal/messenger/email/email.go
@@ -155,7 +155,7 @@ func (e *Emailer) Push(m models.Message) error {
em.Bcc = append(em.Bcc, strings.TrimSpace(part))
}
em.Headers.Del(hdrBcc)
- }
+ }
// If the `Cc` header is set, it should be set on the Envelope
if cc := em.Headers.Get(hdrCc); cc != "" {
@@ -163,7 +163,7 @@ func (e *Emailer) Push(m models.Message) error {
em.Cc = append(em.Cc, strings.TrimSpace(part))
}
em.Headers.Del(hdrCc)
- }
+ }
switch m.ContentType {
case "plain":