Skip to content

Commit

Permalink
Fixed typos
Browse files Browse the repository at this point in the history
  • Loading branch information
Gokul Menon committed Feb 28, 2022
1 parent 09f97c4 commit 04c4552
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion cmd/bounce.go
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions cmd/campaigns.go
Expand Up @@ -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

Expand Down Expand Up @@ -346,7 +346,7 @@ func handleUpdateCampaign(c echo.Context) error {
}

// Read the incoming params into the existing campaign fields from the DB.
// This allows updating of values that have been sent where as fields
// This allows updating of values that have been sent whereas fields
// that are not in the request retain the old values.
o := campaignReq{Campaign: cm}
if err := c.Bind(&o); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion cmd/handlers.go
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions cmd/queries.go
Expand Up @@ -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
Expand All @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion cmd/upgrade.go
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions cmd/utils.go
Expand Up @@ -49,7 +49,7 @@ func pqErrMsg(err error) string {
}

// normalizeTags takes a list of string tags and normalizes them by
// lowercasing and removing all special characters except for dashes.
// lower casing and removing all special characters except for dashes.
func normalizeTags(tags []string) []string {
var (
out []string
Expand All @@ -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 == "" {
Expand Down
4 changes: 2 additions & 2 deletions internal/i18n/i18n.go
@@ -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 (
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion internal/messenger/email/email.go
Expand Up @@ -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)),
Expand Down

0 comments on commit 04c4552

Please sign in to comment.