diff --git a/api4/cloud.go b/api4/cloud.go index e05c2222a0..ba9f56f5d3 100644 --- a/api4/cloud.go +++ b/api4/cloud.go @@ -339,7 +339,7 @@ func getInvoicesForSubscription(c *Context, w http.ResponseWriter, r *http.Reque func getSubscriptionInvoicePDF(c *Context, w http.ResponseWriter, r *http.Request) { if c.App.Channels().License() == nil || !*c.App.Channels().License().Features.Cloud { - c.Err = model.NewAppError("Api4.getSuscriptionInvoicePDF", "api.cloud.license_error", nil, "", http.StatusNotImplemented) + c.Err = model.NewAppError("Api4.getSubscriptionInvoicePDF", "api.cloud.license_error", nil, "", http.StatusNotImplemented) return } @@ -355,7 +355,7 @@ func getSubscriptionInvoicePDF(c *Context, w http.ResponseWriter, r *http.Reques pdfData, filename, appErr := c.App.Cloud().GetInvoicePDF(c.AppContext.Session().UserId, c.Params.InvoiceId) if appErr != nil { - c.Err = model.NewAppError("Api4.getSuscriptionInvoicePDF", "api.cloud.request_error", nil, appErr.Error(), http.StatusInternalServerError) + c.Err = model.NewAppError("Api4.getSubscriptionInvoicePDF", "api.cloud.request_error", nil, appErr.Error(), http.StatusInternalServerError) return } diff --git a/api4/user.go b/api4/user.go index fb2c25b747..8863f873f6 100644 --- a/api4/user.go +++ b/api4/user.go @@ -1429,15 +1429,15 @@ func updateUserActive(c *Context, w http.ResponseWriter, r *http.Request) { auditRec.AddMeta("active", active) // true when you're trying to de-activate yourself - isSelfDeactive := !active && c.Params.UserId == c.AppContext.Session().UserId + isSelfDeactivate := !active && c.Params.UserId == c.AppContext.Session().UserId - if !isSelfDeactive && !c.App.SessionHasPermissionTo(*c.AppContext.Session(), model.PermissionSysconsoleWriteUserManagementUsers) { + if !isSelfDeactivate && !c.App.SessionHasPermissionTo(*c.AppContext.Session(), model.PermissionSysconsoleWriteUserManagementUsers) { c.Err = model.NewAppError("updateUserActive", "api.user.update_active.permissions.app_error", nil, "userId="+c.Params.UserId, http.StatusForbidden) return } // if EnableUserDeactivation flag is disabled the user cannot deactivate himself. - if isSelfDeactive && !*c.App.Config().TeamSettings.EnableUserDeactivation { + if isSelfDeactivate && !*c.App.Config().TeamSettings.EnableUserDeactivation { c.Err = model.NewAppError("updateUserActive", "api.user.update_active.not_enable.app_error", nil, "userId="+c.Params.UserId, http.StatusUnauthorized) return } @@ -1466,7 +1466,7 @@ func updateUserActive(c *Context, w http.ResponseWriter, r *http.Request) { auditRec.Success() c.LogAudit(fmt.Sprintf("user_id=%s active=%v", user.Id, active)) - if isSelfDeactive { + if isSelfDeactivate { c.App.Srv().Go(func() { if err := c.App.Srv().EmailService.SendDeactivateAccountEmail(user.Email, user.Locale, c.App.GetSiteURL()); err != nil { c.LogErrorByCode(model.NewAppError("SendDeactivateEmail", "api.user.send_deactivate_email_and_forget.failed.error", nil, err.Error(), http.StatusInternalServerError)) diff --git a/api4/webhook.go b/api4/webhook.go index 7845684806..be01b9d054 100644 --- a/api4/webhook.go +++ b/api4/webhook.go @@ -59,7 +59,7 @@ func createIncomingHook(c *Context, w http.ResponseWriter, r *http.Request) { userId := c.AppContext.Session().UserId if hook.UserId != "" && hook.UserId != userId { if !c.App.SessionHasPermissionToTeam(*c.AppContext.Session(), channel.TeamId, model.PermissionManageOthersIncomingWebhooks) { - c.LogAudit("fail - innapropriate permissions") + c.LogAudit("fail - inappropriate permissions") c.SetPermissionError(model.PermissionManageOthersIncomingWebhooks) return } @@ -414,7 +414,7 @@ func createOutgoingHook(c *Context, w http.ResponseWriter, r *http.Request) { hook.CreatorId = c.AppContext.Session().UserId } else { if !c.App.SessionHasPermissionToTeam(*c.AppContext.Session(), hook.TeamId, model.PermissionManageOthersOutgoingWebhooks) { - c.LogAudit("fail - innapropriate permissions") + c.LogAudit("fail - inappropriate permissions") c.SetPermissionError(model.PermissionManageOthersOutgoingWebhooks) return } diff --git a/app/admin.go b/app/admin.go index 722a5b4369..ee2c6fabeb 100644 --- a/app/admin.go +++ b/app/admin.go @@ -242,7 +242,7 @@ func (a *App) TestEmail(userID string, cfg *model.Config) *model.AppError { func (s *Server) serverBusyStateChanged(sbs *model.ServerBusyState) { s.Busy.ClusterEventChanged(sbs) if sbs.Busy { - mlog.Warn("server busy state activitated via cluster event - non-critical services disabled", mlog.Int64("expires_sec", sbs.Expires)) + mlog.Warn("server busy state activated via cluster event - non-critical services disabled", mlog.Int64("expires_sec", sbs.Expires)) } else { mlog.Info("server busy state cleared via cluster event - non-critical services enabled") } diff --git a/app/compliance.go b/app/compliance.go index c4e3be4d15..a79ff37d31 100644 --- a/app/compliance.go +++ b/app/compliance.go @@ -65,7 +65,7 @@ func (a *App) GetComplianceReport(reportId string) (*model.Compliance, *model.Ap var nfErr *store.ErrNotFound switch { case errors.As(err, &nfErr): - return nil, model.NewAppError("GetComplicanceReport", "app.compliance.get.finding.app_error", nil, nfErr.Error(), http.StatusNotFound) + return nil, model.NewAppError("GetComplianceReport", "app.compliance.get.finding.app_error", nil, nfErr.Error(), http.StatusNotFound) default: return nil, model.NewAppError("GetComplianceReport", "app.compliance.get.finding.app_error", nil, err.Error(), http.StatusInternalServerError) } diff --git a/app/feature_flags.go b/app/feature_flags.go index dcd888cb8d..582d41d1bf 100644 --- a/app/feature_flags.go +++ b/app/feature_flags.go @@ -36,7 +36,7 @@ func (s *Server) setupFeatureFlags() { } } -func (s *Server) updateFeatureFlagValuesFromManagment() { +func (s *Server) updateFeatureFlagValuesFromManagement() { newCfg := s.configStore.GetNoEnv().Clone() oldFlags := *newCfg.FeatureFlags newFlags := s.featureFlagSynchronizer.UpdateFeatureFlagValues(oldFlags) @@ -94,13 +94,13 @@ func (s *Server) startFeatureFlagUpdateJob() error { s.Log.Warn("Problem connecting to feature flag management. Will fallback to cloud cache.", mlog.Err(err)) return } - s.updateFeatureFlagValuesFromManagment() + s.updateFeatureFlagValuesFromManagement() for { select { case <-s.featureFlagStop: return case <-ticker.C: - s.updateFeatureFlagValuesFromManagment() + s.updateFeatureFlagValuesFromManagement() } } }() diff --git a/app/import_functions.go b/app/import_functions.go index ad5d23a535..9c9239e7e4 100644 --- a/app/import_functions.go +++ b/app/import_functions.go @@ -832,13 +832,13 @@ func (a *App) importUserTeams(user *model.User, data *[]UserTeamImportData) *mod if nErr != nil { var appErr *model.AppError var conflictErr *store.ErrConflict - var limitExeededErr *store.ErrLimitExceeded + var limitExceededErr *store.ErrLimitExceeded switch { case errors.As(nErr, &appErr): // in case we haven't converted to plain error. return appErr case errors.As(nErr, &conflictErr): return model.NewAppError("BulkImport", "app.import.import_user_teams.save_members.conflict.app_error", nil, nErr.Error(), http.StatusBadRequest) - case errors.As(nErr, &limitExeededErr): + case errors.As(nErr, &limitExceededErr): return model.NewAppError("BulkImport", "app.import.import_user_teams.save_members.max_accounts.app_error", nil, nErr.Error(), http.StatusBadRequest) default: // last fallback in case it doesn't map to an existing app error. return model.NewAppError("BulkImport", "app.import.import_user_teams.save_members.error", nil, nErr.Error(), http.StatusInternalServerError) diff --git a/app/integration_action.go b/app/integration_action.go index 7a9e4644bb..e0ebfbb282 100644 --- a/app/integration_action.go +++ b/app/integration_action.go @@ -509,13 +509,13 @@ func (a *App) doLocalWarnMetricsRequest(c *request.Context, rawURL string, upstr }, }, ) - attachements := []*model.SlackAttachment{{ + attachments := []*model.SlackAttachment{{ AuthorName: "", Title: "", Actions: actions, Text: i18n.T("api.server.warn_metric.bot_response.notification_failure.body"), }} - model.ParseSlackAttachment(botPost, attachements) + model.ParseSlackAttachment(botPost, attachments) } } diff --git a/app/notification.go b/app/notification.go index 729e983b11..b1385cbd4c 100644 --- a/app/notification.go +++ b/app/notification.go @@ -338,10 +338,10 @@ func (a *App) SendNotifications(post *model.Post, team *model.Team, channel *mod } if *a.Config().EmailSettings.SendEmailNotifications { - emailReceipients := append(mentionedUsersList, notificationsForCRT.Email...) - emailReceipients = model.RemoveDuplicateStrings(emailReceipients) + emailRecipients := append(mentionedUsersList, notificationsForCRT.Email...) + emailRecipients = model.RemoveDuplicateStrings(emailRecipients) - for _, id := range emailReceipients { + for _, id := range emailRecipients { if profileMap[id] == nil { continue } diff --git a/app/options.go b/app/options.go index d4ff13e9d5..76bcea5310 100644 --- a/app/options.go +++ b/app/options.go @@ -104,7 +104,7 @@ func SetLogger(logger *mlog.Logger) Option { } } -func SkipPostInitializiation() Option { +func SkipPostInitialization() Option { return func(s *Server) error { s.skipPostInit = true diff --git a/app/plugin_signature.go b/app/plugin_signature.go index 2acf4990d1..6dab66efb8 100644 --- a/app/plugin_signature.go +++ b/app/plugin_signature.go @@ -98,12 +98,12 @@ func (ch *Channels) verifyPlugin(plugin, signature io.ReadSeeker) *model.AppErro return model.NewAppError("VerifyPlugin", "api.plugin.verify_plugin.app_error", nil, "", http.StatusInternalServerError) } -func verifySignature(publicKey, message, signatrue io.Reader) error { +func verifySignature(publicKey, message, signature io.Reader) error { pk, err := decodeIfArmored(publicKey) if err != nil { return errors.Wrap(err, "can't decode public key") } - s, err := decodeIfArmored(signatrue) + s, err := decodeIfArmored(signature) if err != nil { return errors.Wrap(err, "can't decode signature") } diff --git a/app/server.go b/app/server.go index e84be601f3..b699e77da2 100644 --- a/app/server.go +++ b/app/server.go @@ -630,7 +630,7 @@ func NewServer(options ...Option) (*Server, error) { go func() { appInstance := New(ServerConnector(s.Channels())) if err := appInstance.UpdateProductNotices(); err != nil { - mlog.Warn("Failied to perform initial product notices fetch", mlog.Err(err)) + mlog.Warn("Failed to perform initial product notices fetch", mlog.Err(err)) } }() } diff --git a/app/server_inactivity.go b/app/server_inactivity.go index 0d91844737..d51524259c 100644 --- a/app/server_inactivity.go +++ b/app/server_inactivity.go @@ -27,8 +27,8 @@ func (s *Server) doInactivityCheck() { return } - inactivityDurationHourseEnv := os.Getenv("MM_INACTIVITY_DURATION") - inactivityDurationHours, parseError := strconv.ParseFloat(inactivityDurationHourseEnv, 64) + inactivityDurationHoursEnv := os.Getenv("MM_INACTIVITY_DURATION") + inactivityDurationHours, parseError := strconv.ParseFloat(inactivityDurationHoursEnv, 64) if parseError != nil { // default to 100 hours inactivityDurationHours = serverInactivityHours @@ -50,14 +50,14 @@ func (s *Server) doInactivityCheck() { if systemValue != nil { sysT, _ := strconv.ParseInt(systemValue.Value, 10, 64) tt := time.Unix(sysT/1000, 0) - timeLastSentInativityEmail := time.Since(tt).Hours() + timeLastSentInactivityEmail := time.Since(tt).Hours() lastPostAt, _ := s.Store.Post().GetLastPostRowCreateAt() if lastPostAt != 0 { posT := time.Unix(lastPostAt/1000, 0) timeForLastPost := time.Since(posT).Hours() - if timeLastSentInativityEmail > inactivityDurationHours && timeForLastPost > inactivityDurationHours { + if timeLastSentInactivityEmail > inactivityDurationHours && timeForLastPost > inactivityDurationHours { s.takeInactivityAction() } return @@ -68,7 +68,7 @@ func (s *Server) doInactivityCheck() { sesT := time.Unix(lastSessionAt/1000, 0) timeForLastSession := time.Since(sesT).Hours() - if timeLastSentInativityEmail > inactivityDurationHours && timeForLastSession > inactivityDurationHours { + if timeLastSentInactivityEmail > inactivityDurationHours && timeForLastSession > inactivityDurationHours { s.takeInactivityAction() } return diff --git a/app/team.go b/app/team.go index 9d5be5e432..6fb01863e7 100644 --- a/app/team.go +++ b/app/team.go @@ -650,7 +650,7 @@ func (a *App) JoinUserToTeam(c *request.Context, team *model.Team, user *model.U if err != nil { var appErr *model.AppError var conflictErr *store.ErrConflict - var limitExeededErr *store.ErrLimitExceeded + var limitExceededErr *store.ErrLimitExceeded switch { case errors.Is(err, teams.AcceptedDomainError): return nil, model.NewAppError("JoinUserToTeam", "api.team.join_user_to_team.allowed_domains.app_error", nil, "", http.StatusBadRequest) @@ -662,7 +662,7 @@ func (a *App) JoinUserToTeam(c *request.Context, team *model.Team, user *model.U return nil, appErr case errors.As(err, &conflictErr): return nil, model.NewAppError("JoinUserToTeam", "app.team.join_user_to_team.save_member.conflict.app_error", nil, err.Error(), http.StatusBadRequest) - case errors.As(err, &limitExeededErr): + case errors.As(err, &limitExceededErr): return nil, model.NewAppError("JoinUserToTeam", "app.team.join_user_to_team.save_member.max_accounts.app_error", nil, err.Error(), http.StatusBadRequest) default: // last fallback in case it doesn't map to an existing app error. return nil, model.NewAppError("JoinUserToTeam", "app.team.join_user_to_team.save_member.app_error", nil, err.Error(), http.StatusInternalServerError) diff --git a/db/migrations/mysql/000046_create_users.up.sql b/db/migrations/mysql/000046_create_users.up.sql index 1943c0eb74..f279c44ca6 100644 --- a/db/migrations/mysql/000046_create_users.up.sql +++ b/db/migrations/mysql/000046_create_users.up.sql @@ -147,9 +147,9 @@ SET @preparedStatement = (SELECT IF( 'SELECT 1' )); -PREPARE updateIfMissmatch FROM @preparedStatement; -EXECUTE updateIfMissmatch; -DEALLOCATE PREPARE updateIfMissmatch; +PREPARE updateIfMismatch FROM @preparedStatement; +EXECUTE updateIfMismatch; +DEALLOCATE PREPARE updateIfMismatch; SET @preparedStatement = (SELECT IF( ( diff --git a/einterfaces/account_migration.go b/einterfaces/account_migration.go index 08b47b2ba1..901bb73cd5 100644 --- a/einterfaces/account_migration.go +++ b/einterfaces/account_migration.go @@ -8,6 +8,6 @@ import ( ) type AccountMigrationInterface interface { - MigrateToLdap(fromAuthService string, forignUserFieldNameToMatch string, force bool, dryRun bool) *model.AppError + MigrateToLdap(fromAuthService string, foreignUserFieldNameToMatch string, force bool, dryRun bool) *model.AppError MigrateToSaml(fromAuthService string, usersMap map[string]string, auto bool, dryRun bool) *model.AppError } diff --git a/einterfaces/mocks/AccountMigrationInterface.go b/einterfaces/mocks/AccountMigrationInterface.go index 1b68f1ba61..566ee171f9 100644 --- a/einterfaces/mocks/AccountMigrationInterface.go +++ b/einterfaces/mocks/AccountMigrationInterface.go @@ -14,13 +14,13 @@ type AccountMigrationInterface struct { mock.Mock } -// MigrateToLdap provides a mock function with given fields: fromAuthService, forignUserFieldNameToMatch, force, dryRun -func (_m *AccountMigrationInterface) MigrateToLdap(fromAuthService string, forignUserFieldNameToMatch string, force bool, dryRun bool) *model.AppError { - ret := _m.Called(fromAuthService, forignUserFieldNameToMatch, force, dryRun) +// MigrateToLdap provides a mock function with given fields: fromAuthService, foreignUserFieldNameToMatch, force, dryRun +func (_m *AccountMigrationInterface) MigrateToLdap(fromAuthService string, foreignUserFieldNameToMatch string, force bool, dryRun bool) *model.AppError { + ret := _m.Called(fromAuthService, foreignUserFieldNameToMatch, force, dryRun) var r0 *model.AppError if rf, ok := ret.Get(0).(func(string, string, bool, bool) *model.AppError); ok { - r0 = rf(fromAuthService, forignUserFieldNameToMatch, force, dryRun) + r0 = rf(fromAuthService, foreignUserFieldNameToMatch, force, dryRun) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*model.AppError) diff --git a/plugin/hooks.go b/plugin/hooks.go index 266e3fba9f..a8d6485c9e 100644 --- a/plugin/hooks.go +++ b/plugin/hooks.go @@ -260,7 +260,7 @@ type Hooks interface { // Minimum server version: 6.5 OnInstall(c *Context, event model.OnInstallEvent) error - // OnSendDailyTelemetry is invoked when the server send the daily telemtry data. + // OnSendDailyTelemetry is invoked when the server send the daily telemetry data. // // Minimum server version: 6.5 OnSendDailyTelemetry() diff --git a/services/searchengine/bleveengine/common.go b/services/searchengine/bleveengine/common.go index 055b02abf7..3681568ac2 100644 --- a/services/searchengine/bleveengine/common.go +++ b/services/searchengine/bleveengine/common.go @@ -80,12 +80,12 @@ func BLVUserFromUserAndTeams(user *model.User, teamsIds, channelsIds []string) * fullnameSuggestions = searchengine.GetSuggestionInputsSplitBy(fullname, " ") } - nicknameSuggesitons := []string{} + nicknameSuggestions := []string{} if user.Nickname != "" { - nicknameSuggesitons = searchengine.GetSuggestionInputsSplitBy(user.Nickname, " ") + nicknameSuggestions = searchengine.GetSuggestionInputsSplitBy(user.Nickname, " ") } - usernameAndNicknameSuggestions := append(usernameSuggestions, nicknameSuggesitons...) + usernameAndNicknameSuggestions := append(usernameSuggestions, nicknameSuggestions...) return &BLVUser{ Id: user.Id, diff --git a/services/tracing/tracing.go b/services/tracing/tracing.go index b2d129e0e1..4226ef729e 100644 --- a/services/tracing/tracing.go +++ b/services/tracing/tracing.go @@ -62,7 +62,7 @@ func New() (*Tracer, error) { if err != nil { return nil, err } - mlog.Info("Opentracing initialzed") + mlog.Info("Opentracing initialized") return &Tracer{ closer: closer, }, nil diff --git a/shared/filestore/s3store.go b/shared/filestore/s3store.go index 5ab6f1ce3e..d162daa213 100644 --- a/shared/filestore/s3store.go +++ b/shared/filestore/s3store.go @@ -297,7 +297,7 @@ func (b *S3FileBackend) MoveFile(oldPath, newPath string) error { } if _, err := b.client.CopyObject(context.Background(), dstOpts, srcOpts); err != nil { - return errors.Wrapf(err, "unable to copy the file to %s to the new destionation", newPath) + return errors.Wrapf(err, "unable to copy the file to %s to the new destination", newPath) } if err := b.client.RemoveObject(context.Background(), b.bucket, oldPath, s3.RemoveObjectOptions{}); err != nil { diff --git a/store/errors.go b/store/errors.go index 158ea0ceb0..2387cb5a8e 100644 --- a/store/errors.go +++ b/store/errors.go @@ -143,7 +143,7 @@ type ErrUniqueConstraint struct { // Examples: // // store.NewErrUniqueConstraint("DisplayName") // single column constraint -// store.NewErrUniqueConstraint("Name", "Source") // multi-column constaint +// store.NewErrUniqueConstraint("Name", "Source") // multi-column constraint func NewErrUniqueConstraint(columns ...string) *ErrUniqueConstraint { return &ErrUniqueConstraint{ Columns: columns, diff --git a/store/localcachelayer/layer.go b/store/localcachelayer/layer.go index 75276fc0dc..f715c7685e 100644 --- a/store/localcachelayer/layer.go +++ b/store/localcachelayer/layer.go @@ -35,8 +35,8 @@ const ( EmojiCacheSize = 5000 EmojiCacheSec = 30 * 60 - ChannelPinnedPostsCounsCacheSize = model.ChannelCacheSize - ChannelPinnedPostsCountsCacheSec = 30 * 60 + ChannelPinnedPostsCountsCacheSize = model.ChannelCacheSize + ChannelPinnedPostsCountsCacheSec = 30 * 60 ChannelMembersCountsCacheSize = model.ChannelCacheSize ChannelMembersCountsCacheSec = 30 * 60 @@ -206,7 +206,7 @@ func NewLocalCacheLayer(baseStore store.Store, metrics einterfaces.MetricsInterf // Channels if localCacheStore.channelPinnedPostCountsCache, err = cacheProvider.NewCache(&cache.CacheOptions{ - Size: ChannelPinnedPostsCounsCacheSize, + Size: ChannelPinnedPostsCountsCacheSize, Name: "ChannelPinnedPostsCounts", DefaultExpiry: ChannelPinnedPostsCountsCacheSec * time.Second, InvalidateClusterEvent: model.ClusterEventInvalidateCacheForChannelPinnedpostsCounts, diff --git a/store/sqlstore/channel_store.go b/store/sqlstore/channel_store.go index b9a023bf20..2291c5a95c 100644 --- a/store/sqlstore/channel_store.go +++ b/store/sqlstore/channel_store.go @@ -1326,7 +1326,7 @@ func (s SqlChannelStore) GetPrivateChannelsForTeam(teamId string, offset int, li err = s.GetReplicaX().Select(&channels, query, args...) if err != nil { - return nil, errors.Wrapf(err, "failed to find chaneld with teamId=%s", teamId) + return nil, errors.Wrapf(err, "failed to find channel with teamId=%s", teamId) } return channels, nil } @@ -1349,7 +1349,7 @@ func (s SqlChannelStore) GetPublicChannelsForTeam(teamId string, offset int, lim `, teamId, limit, offset) if err != nil { - return nil, errors.Wrapf(err, "failed to find chaneld with teamId=%s", teamId) + return nil, errors.Wrapf(err, "failed to find channel with teamId=%s", teamId) } return channels, nil @@ -2229,7 +2229,7 @@ func (s SqlChannelStore) GetMemberCount(channelId string, allowFromCache bool) ( AND ChannelMembers.ChannelId = ? AND Users.DeleteAt = 0`, channelId) if err != nil { - return 0, errors.Wrapf(err, "failed to count ChanenelMembers with channelId=%s", channelId) + return 0, errors.Wrapf(err, "failed to count ChannelMembers with channelId=%s", channelId) } return count, nil diff --git a/store/sqlstore/channel_store_categories.go b/store/sqlstore/channel_store_categories.go index 82d63779cb..5dae1da97b 100644 --- a/store/sqlstore/channel_store_categories.go +++ b/store/sqlstore/channel_store_categories.go @@ -683,7 +683,7 @@ func (s SqlChannelStore) UpdateSidebarCategories(userId, teamId string, categori ).ToSql() if err2 != nil { - return nil, nil, errors.Wrap(err2, "update_sidebar_catetories_tosql") + return nil, nil, errors.Wrap(err2, "update_sidebar_categories_tosql") } if _, err = transaction.Exec(query, args...); err != nil { @@ -1017,7 +1017,7 @@ func (s SqlChannelStore) DeleteSidebarCategory(categoryId string) error { Delete("SidebarCategories"). Where(sq.Eq{"Id": categoryId}).ToSql() if err != nil { - return errors.Wrap(err, "delete_sidebar_cateory_tosql") + return errors.Wrap(err, "delete_sidebar_category_tosql") } if _, err = transaction.Exec(query, args...); err != nil { return errors.Wrap(err, "failed to delete SidebarCategory") @@ -1028,7 +1028,7 @@ func (s SqlChannelStore) DeleteSidebarCategory(categoryId string) error { Delete("SidebarChannels"). Where(sq.Eq{"CategoryId": categoryId}).ToSql() if err != nil { - return errors.Wrap(err, "delete_sidebar_cateory_tosql") + return errors.Wrap(err, "delete_sidebar_category_tosql") } if _, err = transaction.Exec(query, args...); err != nil { return errors.Wrap(err, "failed to delete SidebarChannel") diff --git a/store/sqlstore/session_store.go b/store/sqlstore/session_store.go index 6dea306048..da7c2fc3a1 100644 --- a/store/sqlstore/session_store.go +++ b/store/sqlstore/session_store.go @@ -226,7 +226,7 @@ func (me *SqlSessionStore) GetLastSessionRowCreateAt() (int64, error) { var createAt int64 err := me.GetReplicaX().Get(&createAt, query) if err != nil { - return 0, errors.Wrapf(err, "failed to get last session creatat") + return 0, errors.Wrapf(err, "failed to get last session createat") } return createAt, nil diff --git a/store/sqlstore/shared_channel_store.go b/store/sqlstore/shared_channel_store.go index 4799711546..1b0f083fbe 100644 --- a/store/sqlstore/shared_channel_store.go +++ b/store/sqlstore/shared_channel_store.go @@ -809,7 +809,7 @@ func (s SqlSharedChannelStore) UpdateAttachmentLastSyncAt(id string, syncTime in result, err := s.GetMasterX().Exec(squery, args...) if err != nil { - return errors.Wrap(err, "failed to update LastSycnAt for SharedChannelAttachment") + return errors.Wrap(err, "failed to update LastSyncAt for SharedChannelAttachment") } count, err := result.RowsAffected() diff --git a/store/sqlstore/team_store.go b/store/sqlstore/team_store.go index 10d434dd8b..b852752098 100644 --- a/store/sqlstore/team_store.go +++ b/store/sqlstore/team_store.go @@ -1391,7 +1391,7 @@ func (s SqlTeamStore) AnalyticsGetTeamCountForScheme(schemeId string) (int64, er var count int64 err = s.GetReplicaX().Get(&count, query, args...) if err != nil { - return 0, errors.Wrapf(err, "failed to count Teams with schemdId=%s", schemeId) + return 0, errors.Wrapf(err, "failed to count Teams with schemeId=%s", schemeId) } return count, nil diff --git a/store/sqlstore/webhook_store.go b/store/sqlstore/webhook_store.go index 0a72d4058a..a069bc4708 100644 --- a/store/sqlstore/webhook_store.go +++ b/store/sqlstore/webhook_store.go @@ -155,7 +155,7 @@ func (s SqlWebhookStore) GetIncomingByTeamByUser(teamId string, userId string, o } if err := s.GetReplicaX().Select(&webhooks, queryString, args...); err != nil { - return nil, errors.Wrapf(err, "failed to find IncomingWebhoook with teamId=%s", teamId) + return nil, errors.Wrapf(err, "failed to find IncomingWebhook with teamId=%s", teamId) } return webhooks, nil diff --git a/templates/payment_failed_body.html b/templates/payment_failed_body.html index 219c0ced53..b9d587e5d2 100644 --- a/templates/payment_failed_body.html +++ b/templates/payment_failed_body.html @@ -51,7 +51,7 @@ -