Fixed typos
This commit is contained in:
parent
09f97c40d7
commit
04c4552a9c
8 changed files with 12 additions and 12 deletions
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
||||
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
|
@ -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 == "" {
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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)),
|
||||
|
|
Loading…
Reference in a new issue