Fixed typos

This commit is contained in:
Gokul Menon 2022-02-28 14:19:50 +01:00
parent 09f97c40d7
commit 04c4552a9c
8 changed files with 12 additions and 12 deletions

View file

@ -147,7 +147,7 @@ func handleBounceWebhook(c echo.Context) error {
bounces []models.Bounce
)
// Read the request body instead of using using c.Bind() to read to save the entire raw request as meta.
// Read the request body instead of using c.Bind() to read to save the entire raw request as meta.
rawReq, err := ioutil.ReadAll(c.Request().Body)
if err != nil {
app.log.Printf("error reading ses notification body: %v", err)

View file

@ -22,7 +22,7 @@ import (
)
// campaignReq is a wrapper over the Campaign model for receiving
// campaign creation and updation data from APIs.
// campaign creation and update data from APIs.
type campaignReq struct {
models.Campaign

View file

@ -189,7 +189,7 @@ func handleHealthCheck(c echo.Context) error {
return c.JSON(http.StatusOK, okResp{true})
}
// serveCustomApperance serves the given custom CSS/JS apperance blob
// serveCustomApperance 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 {
return func(c echo.Context) error {

View file

@ -121,7 +121,7 @@ func connectDB(c dbConf) (*sqlx.DB, error) {
return db, nil
}
// compileSubscriberQueryTpl takes a arbitrary WHERE expressions
// compileSubscriberQueryTpl takes an arbitrary WHERE expressions
// to filter subscribers from the subscribers table and prepares a query
// out of it using the raw `query-subscribers-template` query template.
// While doing this, a readonly transaction is created and the query is
@ -145,7 +145,7 @@ func (q *Queries) compileSubscriberQueryTpl(exp string, db *sqlx.DB) (string, er
return stmt, nil
}
// compileSubscriberQueryTpl takes a arbitrary WHERE expressions and a subscriber
// compileSubscriberQueryTpl takes an arbitrary WHERE expressions and a subscriber
// query template that depends on the filter (eg: delete by query, blocklist by query etc.)
// combines and executes them.
func (q *Queries) execSubscriberQueryTpl(exp, tpl string, listIDs []int64, db *sqlx.DB, args ...interface{}) error {

View file

@ -112,7 +112,7 @@ func getPendingMigrations(db *sqlx.DB) (string, []migFunc, error) {
}
// Iterate through the migration versions and get everything above the last
// last upgraded semver.
// upgraded semver.
var toRun []migFunc
for i, m := range migList {
if semver.Compare(m.version, lastVer) > 0 {

View file

@ -67,7 +67,7 @@ func normalizeTags(tags []string) []string {
}
// makeMsgTpl takes a page title, heading, and message and returns
// a msgTpl that can be rendered as a HTML view. This is used for
// a msgTpl that can be rendered as an HTML view. This is used for
// rendering arbitrary HTML views with error and success messages.
func makeMsgTpl(pageTitle, heading, msg string) msgTpl {
if heading == "" {

View file

@ -1,6 +1,6 @@
// i18n is a simple package that translates strings using a language map.
// It mimicks some functionality of the vue-i18n library so that the same JSON
// language map may be used in the JS frontent and the Go backend.
// language map may be used in the JS frontend and the Go backend.
package i18n
import (
@ -85,7 +85,7 @@ func (i *I18n) T(key string) string {
}
// Ts returns the translation for the given key similar to vue i18n's t()
// and subsitutes the params in the given map in the translated value.
// and substitutes the params in the given map in the translated value.
// In the language values, the substitutions are represented as: {key}
// The params and values are received as a pairs of succeeding strings.
// That is, the number of these arguments should be an even number.

View file

@ -34,7 +34,7 @@ type Emailer struct {
servers []*Server
}
// New returns an SMTP e-mail Messenger backend with a the given SMTP servers.
// New returns an SMTP e-mail Messenger backend with the given SMTP servers.
func New(servers ...Server) (*Emailer, error) {
e := &Emailer{
servers: make([]*Server, 0, len(servers)),