From 014a3b6a60610ba592c5843080686f4481553136 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Espino?= Date: Thu, 29 Mar 2018 16:04:54 +0200 Subject: Fixing misspell errors (#8544) --- api/admin_test.go | 2 +- api/command_loadtest_test.go | 2 +- api/command_me_test.go | 2 +- api/command_shrug_test.go | 2 +- api/general.go | 2 +- api/oauth_test.go | 2 +- api/team_test.go | 2 +- api4/channel.go | 2 +- api4/context.go | 2 +- api4/role_test.go | 2 +- api4/team_test.go | 2 +- app/authorization_test.go | 2 +- app/channel.go | 2 +- app/command_loadtest.go | 2 +- app/diagnostics_test.go | 6 +++--- app/import_test.go | 8 ++++---- cmd/commands/reset.go | 2 +- cmd/commands/user.go | 4 ++-- jobs/jobs_watcher.go | 2 +- manualtesting/manual_testing.go | 2 +- model/client.go | 6 +++--- model/config.go | 2 +- model/websocket_client.go | 4 ++-- store/sqlstore/channel_store.go | 4 ++-- store/storetest/channel_store.go | 4 ++-- utils/config_test.go | 12 ++++++------ utils/i18n.go | 2 +- utils/mail.go | 2 +- 28 files changed, 44 insertions(+), 44 deletions(-) diff --git a/api/admin_test.go b/api/admin_test.go index 00e5b3c7f..dfa6cd3b9 100644 --- a/api/admin_test.go +++ b/api/admin_test.go @@ -573,7 +573,7 @@ func TestAdminResetPassword(t *testing.T) { Client.SetTeamId(team.Id) if _, err := Client.AdminResetPassword(user.Id, "newpwd1"); err == nil { - t.Fatal("Should have errored - not sytem admin") + t.Fatal("Should have errored - not system admin") } } diff --git a/api/command_loadtest_test.go b/api/command_loadtest_test.go index e5f95881d..570b8a09b 100644 --- a/api/command_loadtest_test.go +++ b/api/command_loadtest_test.go @@ -38,7 +38,7 @@ func TestLoadTestSetupCommands(t *testing.T) { th.App.UpdateConfig(func(cfg *model.Config) { cfg.ServiceSettings.EnableTesting = true }) rs := Client.Must(Client.Command(channel.Id, "/test setup fuzz 1 1 1")).Data.(*model.CommandResponse) - if rs.Text != "Created enviroment" { + if rs.Text != "Created environment" { t.Fatal(rs.Text) } diff --git a/api/command_me_test.go b/api/command_me_test.go index 7ca21ae6c..63718ca68 100644 --- a/api/command_me_test.go +++ b/api/command_me_test.go @@ -32,7 +32,7 @@ func TestMeCommand(t *testing.T) { } else { if p1.Posts[p1.Order[0]].Message != `*hello*` { t.Log(p1.Posts[p1.Order[0]].Message) - t.Fatal("invalid shrug reponse") + t.Fatal("invalid shrug response") } } } diff --git a/api/command_shrug_test.go b/api/command_shrug_test.go index b524a588f..9b453a48d 100644 --- a/api/command_shrug_test.go +++ b/api/command_shrug_test.go @@ -32,7 +32,7 @@ func TestShrugCommand(t *testing.T) { } else { if p1.Posts[p1.Order[0]].Message != `¯\\\_(ツ)\_/¯` { t.Log(p1.Posts[p1.Order[0]].Message) - t.Fatal("invalid shrug reponse") + t.Fatal("invalid shrug response") } } } diff --git a/api/general.go b/api/general.go index 94da47330..51c491526 100644 --- a/api/general.go +++ b/api/general.go @@ -40,7 +40,7 @@ func logClient(c *Context, w http.ResponseWriter, r *http.Request) { lvl := m["level"] msg := m["message"] - // filter out javascript errors from franz that are poluting the log files + // filter out javascript errors from franz that are polluting the log files if strings.Contains(msg, "/franz") { forceToDebug = true } diff --git a/api/oauth_test.go b/api/oauth_test.go index 2663c784b..2428441b1 100644 --- a/api/oauth_test.go +++ b/api/oauth_test.go @@ -428,7 +428,7 @@ func TestOAuthRegenerateAppSecret(t *testing.T) { } if app2.ClientSecret == oauthApp.ClientSecret { - t.Fatal("Should have been diferent client Secrets") + t.Fatal("Should have been different client Secrets") } } } diff --git a/api/team_test.go b/api/team_test.go index 3db454b62..b7af0f1e8 100644 --- a/api/team_test.go +++ b/api/team_test.go @@ -931,7 +931,7 @@ func TestUpdateTeamMemberRoles(t *testing.T) { t.Fatal("Should have worked, user is team admin and has the ability to manage permissions on this team.") // Note to anyone who thinks this test is wrong: // This operation will not effect the system admin's permissions because they have global access to all teams. - // Their team level permissions are irrelavent. A team admin should be able to manage team level permissions. + // Their team level permissions are irrelevant. A team admin should be able to manage team level permissions. } // System admins should be able to manipulate permission no matter what their team level permissions are. diff --git a/api4/channel.go b/api4/channel.go index f5f6bd06d..5a43d5e4a 100644 --- a/api4/channel.go +++ b/api4/channel.go @@ -743,7 +743,7 @@ func viewChannel(c *Context, w http.ResponseWriter, r *http.Request) { c.App.UpdateLastActivityAtIfNeeded(c.Session) - // Returning {"status": "OK", ...} for backwards compatability + // Returning {"status": "OK", ...} for backwards compatibility resp := &model.ChannelViewResponse{ Status: "OK", LastViewedAtTimes: times, diff --git a/api4/context.go b/api4/context.go index 62fe55758..1f27431d2 100644 --- a/api4/context.go +++ b/api4/context.go @@ -155,7 +155,7 @@ func (h handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { h.handleFunc(c, w, r) } - // Handle errors that have occured + // Handle errors that have occurred if c.Err != nil { c.Err.Translate(c.T) c.Err.RequestId = c.RequestId diff --git a/api4/role_test.go b/api4/role_test.go index c5d8e303e..8149ff3c6 100644 --- a/api4/role_test.go +++ b/api4/role_test.go @@ -129,7 +129,7 @@ func TestGetRolesByNames(t *testing.T) { assert.Contains(t, received, role2) assert.Contains(t, received, role3) - // Check a list of non-existant roles. + // Check a list of non-existent roles. received, resp = th.Client.GetRolesByNames([]string{model.NewId(), model.NewId()}) CheckNoError(t, resp) diff --git a/api4/team_test.go b/api4/team_test.go index f969d05b2..31eeb7fd8 100644 --- a/api4/team_test.go +++ b/api4/team_test.go @@ -1676,7 +1676,7 @@ func TestUpdateTeamMemberRoles(t *testing.T) { // Note from API v3 // Note to anyone who thinks this (above) test is wrong: // This operation will not affect the system admin's permissions because they have global access to all teams. - // Their team level permissions are irrelavent. A team admin should be able to manage team level permissions. + // Their team level permissions are irrelevant. A team admin should be able to manage team level permissions. // System admins should be able to manipulate permission no matter what their team level permissions are. // system admin promotes user 2 diff --git a/app/authorization_test.go b/app/authorization_test.go index 2127a682e..1900c9f41 100644 --- a/app/authorization_test.go +++ b/app/authorization_test.go @@ -19,7 +19,7 @@ func TestCheckIfRolesGrantPermission(t *testing.T) { shouldGrant bool }{ {[]string{model.SYSTEM_ADMIN_ROLE_ID}, model.PERMISSION_MANAGE_SYSTEM.Id, true}, - {[]string{model.SYSTEM_ADMIN_ROLE_ID}, "non-existant-permission", false}, + {[]string{model.SYSTEM_ADMIN_ROLE_ID}, "non-existent-permission", false}, {[]string{model.CHANNEL_USER_ROLE_ID}, model.PERMISSION_READ_CHANNEL.Id, true}, {[]string{model.CHANNEL_USER_ROLE_ID}, model.PERMISSION_MANAGE_SYSTEM.Id, false}, {[]string{model.SYSTEM_ADMIN_ROLE_ID, model.CHANNEL_USER_ROLE_ID}, model.PERMISSION_MANAGE_SYSTEM.Id, true}, diff --git a/app/channel.go b/app/channel.go index 4e405dd93..6e11d4e5d 100644 --- a/app/channel.go +++ b/app/channel.go @@ -252,7 +252,7 @@ func (a *App) WaitForChannelMembership(channelId string, userId string) { return } - // If we recieved a error but it wasn't a missing channel member then return + // If we received a error but it wasn't a missing channel member then return if result.Err.Id != store.MISSING_CHANNEL_MEMBER_ERROR { return } diff --git a/app/command_loadtest.go b/app/command_loadtest.go index 501263d04..e43a7113f 100644 --- a/app/command_loadtest.go +++ b/app/command_loadtest.go @@ -204,7 +204,7 @@ func (me *LoadTestProvider) SetupCommand(a *App, args *model.CommandArgs, messag doFuzz) } - return &model.CommandResponse{Text: "Created enviroment", ResponseType: model.COMMAND_RESPONSE_TYPE_EPHEMERAL} + return &model.CommandResponse{Text: "Created environment", ResponseType: model.COMMAND_RESPONSE_TYPE_EPHEMERAL} } func (me *LoadTestProvider) UsersCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse { diff --git a/app/diagnostics_test.go b/app/diagnostics_test.go index 869e5ddc6..2c61fb335 100644 --- a/app/diagnostics_test.go +++ b/app/diagnostics_test.go @@ -79,7 +79,7 @@ func TestDiagnostics(t *testing.T) { t.Fail() } case <-time.After(time.Second * 1): - t.Fatal("Did not recieve ID message") + t.Fatal("Did not receive ID message") } t.Run("Send", func(t *testing.T) { @@ -94,7 +94,7 @@ func TestDiagnostics(t *testing.T) { t.Fail() } case <-time.After(time.Second * 1): - t.Fatal("Did not recieve diagnostic") + t.Fatal("Did not receive diagnostic") } }) @@ -163,7 +163,7 @@ func TestDiagnostics(t *testing.T) { case <-data: t.Fatal("Should not send diagnostics when they are disabled") case <-time.After(time.Second * 1): - // Did not recieve diagnostics + // Did not receive diagnostics } }) } diff --git a/app/import_test.go b/app/import_test.go index 073741b19..1024a5438 100644 --- a/app/import_test.go +++ b/app/import_test.go @@ -1338,11 +1338,11 @@ func TestImportImportChannel(t *testing.T) { t.Fatalf("Failed to get channel count.") } - // Do a valid channel in apply mode with a nonexistant team. + // Do a valid channel in apply mode with a non-existent team. data.Name = ptrStr("channelname") data.Team = ptrStr(model.NewId()) if err := th.App.ImportChannel(&data, false); err == nil { - t.Fatalf("Expected error due to non-existant team (apply mode).") + t.Fatalf("Expected error due to non-existent team (apply mode).") } // Check that no more channels are in the DB. @@ -2501,7 +2501,7 @@ func TestImportImportDirectChannel(t *testing.T) { model.NewId(), } if err := th.App.ImportDirectChannel(&data, true); err != nil { - t.Fatalf("Expected success as cannot validate existance of channel members in dry run mode.") + t.Fatalf("Expected success as cannot validate existence of channel members in dry run mode.") } // Check that no more channels are in the DB. @@ -2515,7 +2515,7 @@ func TestImportImportDirectChannel(t *testing.T) { model.NewId(), } if err := th.App.ImportDirectChannel(&data, true); err != nil { - t.Fatalf("Expected success as cannot validate existance of channel members in dry run mode.") + t.Fatalf("Expected success as cannot validate existence of channel members in dry run mode.") } // Check that no more channels are in the DB. diff --git a/cmd/commands/reset.go b/cmd/commands/reset.go index e479d0354..e766b2206 100644 --- a/cmd/commands/reset.go +++ b/cmd/commands/reset.go @@ -47,7 +47,7 @@ func resetCmdF(command *cobra.Command, args []string) error { } a.Srv.Store.DropAllTables() - cmd.CommandPrettyPrintln("Database sucessfully reset") + cmd.CommandPrettyPrintln("Database successfully reset") return nil } diff --git a/cmd/commands/user.go b/cmd/commands/user.go index fe4d34a48..9f5e5ae0d 100644 --- a/cmd/commands/user.go +++ b/cmd/commands/user.go @@ -576,7 +576,7 @@ func migrateAuthToLdapCmdF(command *cobra.Command, args []string) error { return errors.New("Error while migrating users: " + err.Error()) } - cmd.CommandPrettyPrintln("Sucessfully migrated accounts.") + cmd.CommandPrettyPrintln("Successfully migrated accounts.") } return nil @@ -631,7 +631,7 @@ func migrateAuthToSamlCmdF(command *cobra.Command, args []string) error { return errors.New("Error while migrating users: " + err.Error()) } l4g.Close() - cmd.CommandPrettyPrintln("Sucessfully migrated accounts.") + cmd.CommandPrettyPrintln("Successfully migrated accounts.") } return nil diff --git a/jobs/jobs_watcher.go b/jobs/jobs_watcher.go index eaa3a4e73..645715db4 100644 --- a/jobs/jobs_watcher.go +++ b/jobs/jobs_watcher.go @@ -66,7 +66,7 @@ func (watcher *Watcher) Stop() { func (watcher *Watcher) PollAndNotify() { if result := <-watcher.srv.Store.Job().GetAllByStatus(model.JOB_STATUS_PENDING); result.Err != nil { - l4g.Error("Error occured getting all pending statuses: %v", result.Err.Error()) + l4g.Error("Error occurred getting all pending statuses: %v", result.Err.Error()) } else { jobs := result.Data.([]*model.Job) diff --git a/manualtesting/manual_testing.go b/manualtesting/manual_testing.go index becf4ec1b..9743df006 100644 --- a/manualtesting/manual_testing.go +++ b/manualtesting/manual_testing.go @@ -113,7 +113,7 @@ func manualTest(c *api.Context, w http.ResponseWriter, r *http.Request) { return } - // Respond with an auth token this can be overriden by a specific test as required + // Respond with an auth token this can be overridden by a specific test as required sessionCookie := &http.Cookie{ Name: model.SESSION_COOKIE_TOKEN, Value: client.AuthToken, diff --git a/model/client.go b/model/client.go index ef890b593..b56043a92 100644 --- a/model/client.go +++ b/model/client.go @@ -72,7 +72,7 @@ type Client struct { ServerVersion string } -// NewClient constructs a new client with convienence methods for talking to +// NewClient constructs a new client with convenience methods for talking to // the server. func NewClient(url string) *Client { return &Client{url, url + API_URL_SUFFIX_V3, &http.Client{}, "", "", "", "", "", ""} @@ -257,7 +257,7 @@ func (c *Client) clearExtraProperties() { // General Routes Section // GetClientProperties returns properties needed by the client to show/hide -// certian features. It returns a map of strings. +// certain features. It returns a map of strings. func (c *Client) GetClientProperties() (map[string]string, *AppError) { c.clearExtraProperties() if r, err := c.DoApiGet(c.GetGeneralRoute()+"/client_props", "", ""); err != nil { @@ -2231,7 +2231,7 @@ func (c *Client) GetCustomEmojiImageUrl(id string) string { // Uploads a x509 base64 Certificate or Private Key file to be used with SAML. // data byte array is required and needs to be a Multi-Part with 'certificate' as the field name -// contentType is also required. Returns nil if succesful, otherwise returns an AppError +// contentType is also required. Returns nil if successful, otherwise returns an AppError func (c *Client) UploadCertificateFile(data []byte, contentType string) *AppError { url := c.ApiUrl + "/admin/add_certificate" rq, _ := http.NewRequest("POST", url, bytes.NewReader(data)) diff --git a/model/config.go b/model/config.go index 17a0aafbf..c2b514c33 100644 --- a/model/config.go +++ b/model/config.go @@ -1128,7 +1128,7 @@ type LdapSettings struct { IdAttribute *string PositionAttribute *string - // Syncronization + // Synchronization SyncIntervalMinutes *int // Advanced diff --git a/model/websocket_client.go b/model/websocket_client.go index e5c44dde8..cdec75aba 100644 --- a/model/websocket_client.go +++ b/model/websocket_client.go @@ -26,7 +26,7 @@ type WebSocketClient struct { ListenError *AppError } -// NewWebSocketClient constructs a new WebSocket client with convienence +// NewWebSocketClient constructs a new WebSocket client with convenience // methods for talking to the server. func NewWebSocketClient(url, authToken string) (*WebSocketClient, *AppError) { conn, _, err := websocket.DefaultDialer.Dial(url+API_URL_SUFFIX_V3+"/users/websocket", nil) @@ -51,7 +51,7 @@ func NewWebSocketClient(url, authToken string) (*WebSocketClient, *AppError) { return client, nil } -// NewWebSocketClient4 constructs a new WebSocket client with convienence +// NewWebSocketClient4 constructs a new WebSocket client with convenience // methods for talking to the server. Uses the v4 endpoint. func NewWebSocketClient4(url, authToken string) (*WebSocketClient, *AppError) { conn, _, err := websocket.DefaultDialer.Dial(url+API_URL_SUFFIX+"/websocket", nil) diff --git a/store/sqlstore/channel_store.go b/store/sqlstore/channel_store.go index fe4c561ca..21785c461 100644 --- a/store/sqlstore/channel_store.go +++ b/store/sqlstore/channel_store.go @@ -750,7 +750,7 @@ func (s SqlChannelStore) SaveMember(member *model.ChannelMember) store.StoreChan if err := transaction.Commit(); err != nil { result.Err = model.NewAppError("SqlChannelStore.SaveMember", "store.sql_channel.save_member.commit_transaction.app_error", nil, err.Error(), http.StatusInternalServerError) } - // If sucessfull record members have changed in channel + // If successfull record members have changed in channel if mu := <-s.extraUpdated(channel); mu.Err != nil { result.Err = mu.Err } @@ -1065,7 +1065,7 @@ func (s SqlChannelStore) RemoveMember(channelId string, userId string) store.Sto if err != nil { result.Err = model.NewAppError("SqlChannelStore.RemoveMember", "store.sql_channel.remove_member.app_error", nil, "channel_id="+channelId+", user_id="+userId+", "+err.Error(), http.StatusInternalServerError) } else { - // If sucessfull record members have changed in channel + // If successfull record members have changed in channel if mu := <-s.extraUpdated(channel); mu.Err != nil { result.Err = mu.Err } diff --git a/store/storetest/channel_store.go b/store/storetest/channel_store.go index d3b69edea..481631783 100644 --- a/store/storetest/channel_store.go +++ b/store/storetest/channel_store.go @@ -1463,11 +1463,11 @@ func testGetMember(t *testing.T, ss store.Store) { store.Must(ss.Channel().SaveMember(m2)) if result := <-ss.Channel().GetMember(model.NewId(), userId); result.Err == nil { - t.Fatal("should've failed to get member for non-existant channel") + t.Fatal("should've failed to get member for non-existent channel") } if result := <-ss.Channel().GetMember(c1.Id, model.NewId()); result.Err == nil { - t.Fatal("should've failed to get member for non-existant user") + t.Fatal("should've failed to get member for non-existent user") } if result := <-ss.Channel().GetMember(c1.Id, userId); result.Err != nil { diff --git a/utils/config_test.go b/utils/config_test.go index f816e2ee8..84e7291b0 100644 --- a/utils/config_test.go +++ b/utils/config_test.go @@ -50,7 +50,7 @@ func TestFindConfigFile(t *testing.T) { } func TestConfigFromEnviroVars(t *testing.T) { - os.Setenv("MM_TEAMSETTINGS_SITENAME", "From Enviroment") + os.Setenv("MM_TEAMSETTINGS_SITENAME", "From Environment") os.Setenv("MM_TEAMSETTINGS_CUSTOMBRANDTEXT", "Custom Brand") os.Setenv("MM_SERVICESETTINGS_ENABLECOMMANDS", "false") os.Setenv("MM_SERVICESETTINGS_READTIMEOUT", "400") @@ -59,20 +59,20 @@ func TestConfigFromEnviroVars(t *testing.T) { cfg, cfgPath, err := LoadConfig("config.json") require.Nil(t, err) - if cfg.TeamSettings.SiteName != "From Enviroment" { - t.Fatal("Couldn't read config from enviroment var") + if cfg.TeamSettings.SiteName != "From Environment" { + t.Fatal("Couldn't read config from environment var") } if *cfg.TeamSettings.CustomBrandText != "Custom Brand" { - t.Fatal("Couldn't read config from enviroment var") + t.Fatal("Couldn't read config from environment var") } if *cfg.ServiceSettings.EnableCommands { - t.Fatal("Couldn't read config from enviroment var") + t.Fatal("Couldn't read config from environment var") } if *cfg.ServiceSettings.ReadTimeout != 400 { - t.Fatal("Couldn't read config from enviroment var") + t.Fatal("Couldn't read config from environment var") } os.Unsetenv("MM_TEAMSETTINGS_SITENAME") diff --git a/utils/i18n.go b/utils/i18n.go index 7b8d1fef0..72704c241 100644 --- a/utils/i18n.go +++ b/utils/i18n.go @@ -96,7 +96,7 @@ func GetUserTranslations(locale string) i18n.TranslateFunc { func GetTranslationsAndLocale(w http.ResponseWriter, r *http.Request) (i18n.TranslateFunc, string) { // This is for checking against locales like pt_BR or zn_CN headerLocaleFull := strings.Split(r.Header.Get("Accept-Language"), ",")[0] - // This is for checking agains locales like en, es + // This is for checking against locales like en, es headerLocale := strings.Split(strings.Split(r.Header.Get("Accept-Language"), ",")[0], "-")[0] defaultLocale := *settings.DefaultClientLocale if locales[headerLocaleFull] != "" { diff --git a/utils/mail.go b/utils/mail.go index 43630471c..ee5a8dd6f 100644 --- a/utils/mail.go +++ b/utils/mail.go @@ -82,7 +82,7 @@ func (a *loginAuth) Next(fromServer []byte, more bool) ([]byte, error) { case "Password:": return []byte(a.password), nil default: - return nil, errors.New("Unkown fromServer") + return nil, errors.New("Unknown fromServer") } } return nil, nil -- cgit v1.2.3-1-g7c22