Skip to content

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

fix function name in comment (#1374)

cui fliterf94c1f34b69a
diff --git a/cmd/public.go b/cmd/public.go
index 652aba97..98cf57b0 100644
--- a/cmd/public.go
+++ b/cmd/public.go
@@ -237,7 +237,7 @@ func handleSubscriptionPage(c echo.Context) error {
return c.Render(http.StatusOK, "subscription", out)
}
-// handleSubscriptionPage renders the subscription management page and
+// handleSubscriptionPrefs renders the subscription management page and
// handles unsubscriptions. This is the view that {{ UnsubscribeURL }} in
// campaigns link to.
func handleSubscriptionPrefs(c echo.Context) error {
@@ -466,7 +466,7 @@ func handleSubscriptionForm(c echo.Context) error {
return c.Render(http.StatusOK, tplMessage, makeMsgTpl(app.i18n.T("public.subTitle"), "", app.i18n.Ts(msg)))
}
-// handleSubscriptionForm handles subscription requests coming from public
+// handlePublicSubscription handles subscription requests coming from public
// API calls.
func handlePublicSubscription(c echo.Context) error {
hasOptin, err := processSubForm(c)
diff --git a/cmd/subscribers.go b/cmd/subscribers.go
index a1820935..db631309 100644
--- a/cmd/subscribers.go
+++ b/cmd/subscribers.go
@@ -259,7 +259,7 @@ func handleUpdateSubscriber(c echo.Context) error {
return c.JSON(http.StatusOK, okResp{out})
}
-// handleGetSubscriberSendOptin sends an optin confirmation e-mail to a subscriber.
+// handleSubscriberSendOptin sends an optin confirmation e-mail to a subscriber.
func handleSubscriberSendOptin(c echo.Context) error {
var (
app = c.Get("app").(*App)
diff --git a/cmd/upgrade.go b/cmd/upgrade.go
index 5b7a5617..bd0c1759 100644
--- a/cmd/upgrade.go
+++ b/cmd/upgrade.go
@@ -144,7 +144,7 @@ func getLastMigrationVersion() (string, error) {
return v, nil
}
-// isPqNoTableErr checks if the given error represents a Postgres/pq
+// isTableNotExistErr checks if the given error represents a Postgres/pq
// "table does not exist" error.
func isTableNotExistErr(err error) bool {
if p, ok := err.(*pq.Error); ok {
diff --git a/internal/i18n/i18n.go b/internal/i18n/i18n.go
index f531ff0f..08d7602a 100644
--- a/internal/i18n/i18n.go
+++ b/internal/i18n/i18n.go
@@ -90,8 +90,9 @@ func (i *I18n) T(key string) string {
// The params and values are received as a pairs of succeeding strings.
// That is, the number of these arguments should be an even number.
// eg: Ts("globals.message.notFound",
-// "name", "campaigns",
-// "error", err)
+//
+// "name", "campaigns",
+// "error", err)
func (i *I18n) Ts(key string, params ...string) string {
if len(params)%2 != 0 {
return key + `: Invalid arguments`
@@ -139,7 +140,7 @@ func (i *I18n) getSingular(s string) string {
return strings.TrimSpace(strings.Split(s, "|")[0])
}
-// getSingular returns the plural term from the vuei18n pipe separated value.
+// getPlural returns the plural term from the vuei18n pipe separated value.
// singular term | plural term
func (i *I18n) getPlural(s string) string {
if !strings.Contains(s, "|") {