Skip to content

Commit

Permalink
fix function name in comment (#1374)
Browse files Browse the repository at this point in the history
Signed-off-by: cui fliter <imcusg@gmail.com>
  • Loading branch information
cuishuang authored Jun 20, 2023
1 parent 92a4d99 commit f94c1f3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions cmd/public.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion cmd/subscribers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion cmd/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
7 changes: 4 additions & 3 deletions internal/i18n/i18n.go
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down Expand Up @@ -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, "|") {
Expand Down

0 comments on commit f94c1f3

Please sign in to comment.