Browse Source

Fix typos in models/ and modules/ (#1248)

Ethan Koenig 2 years ago
parent
commit
021904e4e6

+ 1 - 1
models/branches.go

@@ -57,7 +57,7 @@ func GetProtectedBranchBy(repoID int64, BranchName string) (*ProtectedBranch, er
57 57
 	return rel, nil
58 58
 }
59 59
 
60
-// GetProtectedBranches get all protected btanches
60
+// GetProtectedBranches get all protected branches
61 61
 func (repo *Repository) GetProtectedBranches() ([]*ProtectedBranch, error) {
62 62
 	protectedBranches := make([]*ProtectedBranch, 0)
63 63
 	return protectedBranches, x.Find(&protectedBranches, &ProtectedBranch{RepoID: repo.ID})

+ 1 - 1
models/issue.go

@@ -733,7 +733,7 @@ func (issue *Issue) ChangeContent(doer *User, content string) (err error) {
733 733
 	return nil
734 734
 }
735 735
 
736
-// ChangeAssignee changes the Asssignee field of this issue.
736
+// ChangeAssignee changes the Assignee field of this issue.
737 737
 func (issue *Issue) ChangeAssignee(doer *User, assigneeID int64) (err error) {
738 738
 	var oldAssigneeID = issue.AssigneeID
739 739
 	issue.AssigneeID = assigneeID

+ 3 - 3
models/issue_list.go

@@ -59,10 +59,10 @@ func (issues IssueList) loadPosters(e Engine) error {
59 59
 		return nil
60 60
 	}
61 61
 
62
-	postgerIDs := issues.getPosterIDs()
63
-	posterMaps := make(map[int64]*User, len(postgerIDs))
62
+	posterIDs := issues.getPosterIDs()
63
+	posterMaps := make(map[int64]*User, len(posterIDs))
64 64
 	err := e.
65
-		In("id", postgerIDs).
65
+		In("id", posterIDs).
66 66
 		Find(&posterMaps)
67 67
 	if err != nil {
68 68
 		return err

+ 1 - 1
models/migrations/v14.go

@@ -28,7 +28,7 @@ type UserV14 struct {
28 28
 	DiffViewStyle string `xorm:"NOT NULL DEFAULT ''"`
29 29
 }
30 30
 
31
-// TableName will be invoked by XORM to customrize the table name
31
+// TableName will be invoked by XORM to customize the table name
32 32
 func (*UserV14) TableName() string {
33 33
 	return "user"
34 34
 }

+ 3 - 3
models/org_team_test.go

@@ -117,15 +117,15 @@ func TestTeam_HasRepository(t *testing.T) {
117 117
 func TestTeam_AddRepository(t *testing.T) {
118 118
 	assert.NoError(t, PrepareTestDatabase())
119 119
 
120
-	testSucess := func(teamID, repoID int64) {
120
+	testSuccess := func(teamID, repoID int64) {
121 121
 		team := AssertExistsAndLoadBean(t, &Team{ID: teamID}).(*Team)
122 122
 		repo := AssertExistsAndLoadBean(t, &Repository{ID: repoID}).(*Repository)
123 123
 		assert.NoError(t, team.AddRepository(repo))
124 124
 		AssertExistsAndLoadBean(t, &TeamRepo{TeamID: teamID, RepoID: repoID})
125 125
 		CheckConsistencyFor(t, &Team{ID: teamID}, &Repository{ID: repoID})
126 126
 	}
127
-	testSucess(2, 3)
128
-	testSucess(2, 5)
127
+	testSuccess(2, 3)
128
+	testSuccess(2, 5)
129 129
 
130 130
 	team := AssertExistsAndLoadBean(t, &Team{ID: 1}).(*Team)
131 131
 	repo := AssertExistsAndLoadBean(t, &Repository{ID: 1}).(*Repository)

+ 1 - 1
models/release.go

@@ -73,7 +73,7 @@ func (r *Release) loadAttributes(e Engine) error {
73 73
 	return nil
74 74
 }
75 75
 
76
-// LoadAttributes load repo and publisher attributes for a realease
76
+// LoadAttributes load repo and publisher attributes for a release
77 77
 func (r *Release) LoadAttributes() error {
78 78
 	return r.loadAttributes(x)
79 79
 }

+ 3 - 3
models/user.go

@@ -541,7 +541,7 @@ func (u *User) GetOrgRepositoryIDs() ([]int64, error) {
541 541
 		GroupBy("repository.id").Find(&ids)
542 542
 }
543 543
 
544
-// GetAccessRepoIDs returns all repsitories IDs where user's or user is a team member orgnizations
544
+// GetAccessRepoIDs returns all repositories IDs where user's or user is a team member organizations
545 545
 func (u *User) GetAccessRepoIDs() ([]int64, error) {
546 546
 	ids, err := u.GetRepositoryIDs()
547 547
 	if err != nil {
@@ -596,7 +596,7 @@ func (u *User) ShortName(length int) string {
596 596
 	return base.EllipsisString(u.Name, length)
597 597
 }
598 598
 
599
-// IsMailable checks if a user is elegible
599
+// IsMailable checks if a user is eligible
600 600
 // to receive emails.
601 601
 func (u *User) IsMailable() bool {
602 602
 	return u.IsActive
@@ -615,7 +615,7 @@ func IsUserExist(uid int64, name string) (bool, error) {
615 615
 		Get(&User{LowerName: strings.ToLower(name)})
616 616
 }
617 617
 
618
-// GetUserSalt returns a ramdom user salt token.
618
+// GetUserSalt returns a random user salt token.
619 619
 func GetUserSalt() (string, error) {
620 620
 	return base.GetRandomString(10)
621 621
 }

+ 2 - 2
models/webhook.go

@@ -475,11 +475,11 @@ func PrepareWebhooks(repo *Repository, event HookEventType, p api.Payloader) err
475 475
 	// check if repo belongs to org and append additional webhooks
476 476
 	if repo.MustOwner().IsOrganization() {
477 477
 		// get hooks for org
478
-		orgws, err := GetActiveWebhooksByOrgID(repo.OwnerID)
478
+		orgHooks, err := GetActiveWebhooksByOrgID(repo.OwnerID)
479 479
 		if err != nil {
480 480
 			return fmt.Errorf("GetActiveWebhooksByOrgID: %v", err)
481 481
 		}
482
-		ws = append(ws, orgws...)
482
+		ws = append(ws, orgHooks...)
483 483
 	}
484 484
 
485 485
 	if len(ws) == 0 {

+ 3 - 3
modules/auth/org.go

@@ -21,7 +21,7 @@ type CreateOrgForm struct {
21 21
 	OrgName string `binding:"Required;AlphaDashDot;MaxSize(35)" locale:"org.org_name_holder"`
22 22
 }
23 23
 
24
-// Validate valideates the fields
24
+// Validate validates the fields
25 25
 func (f *CreateOrgForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
26 26
 	return validate(errs, ctx.Data, f, ctx.Locale)
27 27
 }
@@ -36,7 +36,7 @@ type UpdateOrgSettingForm struct {
36 36
 	MaxRepoCreation int
37 37
 }
38 38
 
39
-// Validate valideates the fields
39
+// Validate validates the fields
40 40
 func (f *UpdateOrgSettingForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
41 41
 	return validate(errs, ctx.Data, f, ctx.Locale)
42 42
 }
@@ -55,7 +55,7 @@ type CreateTeamForm struct {
55 55
 	Permission  string
56 56
 }
57 57
 
58
-// Validate valideates the fields
58
+// Validate validates the fields
59 59
 func (f *CreateTeamForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
60 60
 	return validate(errs, ctx.Data, f, ctx.Locale)
61 61
 }

+ 18 - 18
modules/auth/repo_form.go

@@ -33,7 +33,7 @@ type CreateRepoForm struct {
33 33
 	Readme      string
34 34
 }
35 35
 
36
-// Validate valideates the fields
36
+// Validate validates the fields
37 37
 func (f *CreateRepoForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
38 38
 	return validate(errs, ctx.Data, f, ctx.Locale)
39 39
 }
@@ -50,7 +50,7 @@ type MigrateRepoForm struct {
50 50
 	Description  string `json:"description" binding:"MaxSize(255)"`
51 51
 }
52 52
 
53
-// Validate valideates the fields
53
+// Validate validates the fields
54 54
 func (f *MigrateRepoForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
55 55
 	return validate(errs, ctx.Data, f, ctx.Locale)
56 56
 }
@@ -105,7 +105,7 @@ type RepoSettingForm struct {
105 105
 	EnablePulls           bool
106 106
 }
107 107
 
108
-// Validate valideates the fields
108
+// Validate validates the fields
109 109
 func (f *RepoSettingForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
110 110
 	return validate(errs, ctx.Data, f, ctx.Locale)
111 111
 }
@@ -149,7 +149,7 @@ type NewWebhookForm struct {
149 149
 	WebhookForm
150 150
 }
151 151
 
152
-// Validate valideates the fields
152
+// Validate validates the fields
153 153
 func (f *NewWebhookForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
154 154
 	return validate(errs, ctx.Data, f, ctx.Locale)
155 155
 }
@@ -164,7 +164,7 @@ type NewSlackHookForm struct {
164 164
 	WebhookForm
165 165
 }
166 166
 
167
-// Validate valideates the fields
167
+// Validate validates the fields
168 168
 func (f *NewSlackHookForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
169 169
 	return validate(errs, ctx.Data, f, ctx.Locale)
170 170
 }
@@ -186,7 +186,7 @@ type CreateIssueForm struct {
186 186
 	Files       []string
187 187
 }
188 188
 
189
-// Validate valideates the fields
189
+// Validate validates the fields
190 190
 func (f *CreateIssueForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
191 191
 	return validate(errs, ctx.Data, f, ctx.Locale)
192 192
 }
@@ -198,7 +198,7 @@ type CreateCommentForm struct {
198 198
 	Files   []string
199 199
 }
200 200
 
201
-// Validate valideates the fields
201
+// Validate validates the fields
202 202
 func (f *CreateCommentForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
203 203
 	return validate(errs, ctx.Data, f, ctx.Locale)
204 204
 }
@@ -217,7 +217,7 @@ type CreateMilestoneForm struct {
217 217
 	Deadline string
218 218
 }
219 219
 
220
-// Validate valideates the fields
220
+// Validate validates the fields
221 221
 func (f *CreateMilestoneForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
222 222
 	return validate(errs, ctx.Data, f, ctx.Locale)
223 223
 }
@@ -236,7 +236,7 @@ type CreateLabelForm struct {
236 236
 	Color string `binding:"Required;Size(7)" locale:"repo.issues.label_color"`
237 237
 }
238 238
 
239
-// Validate valideates the fields
239
+// Validate validates the fields
240 240
 func (f *CreateLabelForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
241 241
 	return validate(errs, ctx.Data, f, ctx.Locale)
242 242
 }
@@ -246,7 +246,7 @@ type InitializeLabelsForm struct {
246 246
 	TemplateName string `binding:"Required"`
247 247
 }
248 248
 
249
-// Validate valideates the fields
249
+// Validate validates the fields
250 250
 func (f *InitializeLabelsForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
251 251
 	return validate(errs, ctx.Data, f, ctx.Locale)
252 252
 }
@@ -269,7 +269,7 @@ type NewReleaseForm struct {
269 269
 	Files      []string
270 270
 }
271 271
 
272
-// Validate valideates the fields
272
+// Validate validates the fields
273 273
 func (f *NewReleaseForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
274 274
 	return validate(errs, ctx.Data, f, ctx.Locale)
275 275
 }
@@ -283,7 +283,7 @@ type EditReleaseForm struct {
283 283
 	Files      []string
284 284
 }
285 285
 
286
-// Validate valideates the fields
286
+// Validate validates the fields
287 287
 func (f *EditReleaseForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
288 288
 	return validate(errs, ctx.Data, f, ctx.Locale)
289 289
 }
@@ -303,7 +303,7 @@ type NewWikiForm struct {
303 303
 	Message  string
304 304
 }
305 305
 
306
-// Validate valideates the fields
306
+// Validate validates the fields
307 307
 // FIXME: use code generation to generate this method.
308 308
 func (f *NewWikiForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
309 309
 	return validate(errs, ctx.Data, f, ctx.Locale)
@@ -327,7 +327,7 @@ type EditRepoFileForm struct {
327 327
 	LastCommit    string
328 328
 }
329 329
 
330
-// Validate valideates the fields
330
+// Validate validates the fields
331 331
 func (f *EditRepoFileForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
332 332
 	return validate(errs, ctx.Data, f, ctx.Locale)
333 333
 }
@@ -337,7 +337,7 @@ type EditPreviewDiffForm struct {
337 337
 	Content string
338 338
 }
339 339
 
340
-// Validate valideates the fields
340
+// Validate validates the fields
341 341
 func (f *EditPreviewDiffForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
342 342
 	return validate(errs, ctx.Data, f, ctx.Locale)
343 343
 }
@@ -360,7 +360,7 @@ type UploadRepoFileForm struct {
360 360
 	Files         []string
361 361
 }
362 362
 
363
-// Validate valideates the fields
363
+// Validate validates the fields
364 364
 func (f *UploadRepoFileForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
365 365
 	return validate(errs, ctx.Data, f, ctx.Locale)
366 366
 }
@@ -370,7 +370,7 @@ type RemoveUploadFileForm struct {
370 370
 	File string `binding:"Required;MaxSize(50)"`
371 371
 }
372 372
 
373
-// Validate valideates the fields
373
+// Validate validates the fields
374 374
 func (f *RemoveUploadFileForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
375 375
 	return validate(errs, ctx.Data, f, ctx.Locale)
376 376
 }
@@ -390,7 +390,7 @@ type DeleteRepoFileForm struct {
390 390
 	NewBranchName string `binding:"AlphaDashDot;MaxSize(100)"`
391 391
 }
392 392
 
393
-// Validate valideates the fields
393
+// Validate validates the fields
394 394
 func (f *DeleteRepoFileForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
395 395
 	return validate(errs, ctx.Data, f, ctx.Locale)
396 396
 }

+ 7 - 7
modules/auth/user_form.go

@@ -53,7 +53,7 @@ type InstallForm struct {
53 53
 	AdminEmail         string `binding:"OmitEmpty;MinSize(3);MaxSize(254);Include(@)" locale:"install.admin_email"`
54 54
 }
55 55
 
56
-// Validate valideates the fields
56
+// Validate validates the fields
57 57
 func (f *InstallForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
58 58
 	return validate(errs, ctx.Data, f, ctx.Locale)
59 59
 }
@@ -107,7 +107,7 @@ type UpdateProfileForm struct {
107 107
 	Location         string `binding:"MaxSize(50)"`
108 108
 }
109 109
 
110
-// Validate valideates the fields
110
+// Validate validates the fields
111 111
 func (f *UpdateProfileForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
112 112
 	return validate(errs, ctx.Data, f, ctx.Locale)
113 113
 }
@@ -126,7 +126,7 @@ type AvatarForm struct {
126 126
 	Federavatar bool
127 127
 }
128 128
 
129
-// Validate valideates the fields
129
+// Validate validates the fields
130 130
 func (f *AvatarForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
131 131
 	return validate(errs, ctx.Data, f, ctx.Locale)
132 132
 }
@@ -136,7 +136,7 @@ type AddEmailForm struct {
136 136
 	Email string `binding:"Required;Email;MaxSize(254)"`
137 137
 }
138 138
 
139
-// Validate valideates the fields
139
+// Validate validates the fields
140 140
 func (f *AddEmailForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
141 141
 	return validate(errs, ctx.Data, f, ctx.Locale)
142 142
 }
@@ -148,7 +148,7 @@ type ChangePasswordForm struct {
148 148
 	Retype      string `form:"retype"`
149 149
 }
150 150
 
151
-// Validate valideates the fields
151
+// Validate validates the fields
152 152
 func (f *ChangePasswordForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
153 153
 	return validate(errs, ctx.Data, f, ctx.Locale)
154 154
 }
@@ -159,7 +159,7 @@ type AddSSHKeyForm struct {
159 159
 	Content string `binding:"Required"`
160 160
 }
161 161
 
162
-// Validate valideates the fields
162
+// Validate validates the fields
163 163
 func (f *AddSSHKeyForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
164 164
 	return validate(errs, ctx.Data, f, ctx.Locale)
165 165
 }
@@ -179,7 +179,7 @@ type TwoFactorAuthForm struct {
179 179
 	Passcode string `binding:"Required"`
180 180
 }
181 181
 
182
-// Validate valideates the fields
182
+// Validate validates the fields
183 183
 func (f *TwoFactorAuthForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
184 184
 	return validate(errs, ctx.Data, f, ctx.Locale)
185 185
 }

+ 1 - 1
modules/context/api.go

@@ -43,7 +43,7 @@ func (ctx *APIContext) Error(status int, title string, obj interface{}) {
43 43
 	})
44 44
 }
45 45
 
46
-// SetLinkHeader sets pagination link header by given totol number and page size.
46
+// SetLinkHeader sets pagination link header by given total number and page size.
47 47
 func (ctx *APIContext) SetLinkHeader(total, pageSize int) {
48 48
 	page := paginater.New(total, pageSize, ctx.QueryInt("page"), 0)
49 49
 	links := make([]string, 0, 4)

+ 1 - 1
modules/context/context.go

@@ -164,7 +164,7 @@ func Contexter() macaron.Handler {
164 164
 
165 165
 		ctx.Data["PageStartTime"] = time.Now()
166 166
 
167
-		// Get user from session if logined.
167
+		// Get user from session if logged in.
168 168
 		ctx.User, ctx.IsBasicAuth = auth.SignedInUser(ctx.Context, ctx.Session)
169 169
 
170 170
 		if ctx.User != nil {

+ 2 - 2
modules/context/repo.go

@@ -27,7 +27,7 @@ type PullRequest struct {
27 27
 	HeadInfo string // [<user>:]<branch>
28 28
 }
29 29
 
30
-// Repository contains informations to operate a repository
30
+// Repository contains information to operate a repository
31 31
 type Repository struct {
32 32
 	AccessMode   models.AccessMode
33 33
 	IsWatching   bool
@@ -330,7 +330,7 @@ func RepoAssignment(args ...bool) macaron.Handler {
330 330
 			}
331 331
 		}
332 332
 
333
-		// People who have push access or have fored repository can propose a new pull request.
333
+		// People who have push access or have forked repository can propose a new pull request.
334 334
 		if ctx.Repo.IsWriter() || (ctx.IsSigned && ctx.User.HasForkedRepo(ctx.Repo.Repository.ID)) {
335 335
 			// Pull request is allowed if this is a fork repository
336 336
 			// and base repository accepts pull requests.

+ 1 - 1
modules/httplib/httplib.go

@@ -438,7 +438,7 @@ func (r *Request) ToXML(v interface{}) error {
438 438
 	return err
439 439
 }
440 440
 
441
-// Response executes request client gets response mannually.
441
+// Response executes request client gets response manually.
442 442
 func (r *Request) Response() (*http.Response, error) {
443 443
 	return r.getResponse()
444 444
 }

+ 1 - 1
modules/lfs/content_store.go

@@ -20,7 +20,7 @@ type ContentStore struct {
20 20
 	BasePath string
21 21
 }
22 22
 
23
-// Get takes a Meta object and retreives the content from the store, returning
23
+// Get takes a Meta object and retrieves the content from the store, returning
24 24
 // it as an io.Reader. If fromByte > 0, the reader starts from that byte
25 25
 func (s *ContentStore) Get(meta *models.LFSMetaObject, fromByte int64) (io.ReadCloser, error) {
26 26
 	path := filepath.Join(s.BasePath, transformKey(meta.Oid))

+ 1 - 1
modules/lfs/server.go

@@ -50,7 +50,7 @@ type BatchResponse struct {
50 50
 	Objects  []*Representation `json:"objects"`
51 51
 }
52 52
 
53
-// Representation is object medata as seen by clients of the lfs server.
53
+// Representation is object metadata as seen by clients of the lfs server.
54 54
 type Representation struct {
55 55
 	Oid     string           `json:"oid"`
56 56
 	Size    int64            `json:"size"`

+ 2 - 2
modules/log/conn.go

@@ -42,7 +42,7 @@ func (cw *ConnWriter) WriteMsg(msg string, skip, level int) error {
42 42
 	if cw.Level > level {
43 43
 		return nil
44 44
 	}
45
-	if cw.neddedConnectOnMsg() {
45
+	if cw.neededConnectOnMsg() {
46 46
 		if err := cw.connect(); err != nil {
47 47
 			return err
48 48
 		}
@@ -87,7 +87,7 @@ func (cw *ConnWriter) connect() error {
87 87
 	return nil
88 88
 }
89 89
 
90
-func (cw *ConnWriter) neddedConnectOnMsg() bool {
90
+func (cw *ConnWriter) neededConnectOnMsg() bool {
91 91
 	if cw.Reconnect {
92 92
 		cw.Reconnect = false
93 93
 		return true

+ 3 - 3
modules/log/log.go

@@ -84,7 +84,7 @@ func Info(format string, v ...interface{}) {
84 84
 	}
85 85
 }
86 86
 
87
-// Warn records warnning log
87
+// Warn records warning log
88 88
 func Warn(format string, v ...interface{}) {
89 89
 	for _, logger := range loggers {
90 90
 		logger.Warn(format, v...)
@@ -275,7 +275,7 @@ func (l *Logger) StartLogger() {
275 275
 	}
276 276
 }
277 277
 
278
-// Flush flushs all chan data.
278
+// Flush flushes all chan data.
279 279
 func (l *Logger) Flush() {
280 280
 	for _, l := range l.outputs {
281 281
 		l.Flush()
@@ -321,7 +321,7 @@ func (l *Logger) Info(format string, v ...interface{}) {
321 321
 	l.writerMsg(0, INFO, msg)
322 322
 }
323 323
 
324
-// Warn records warnning log
324
+// Warn records warning log
325 325
 func (l *Logger) Warn(format string, v ...interface{}) {
326 326
 	msg := fmt.Sprintf("[W] "+format, v...)
327 327
 	l.writerMsg(0, WARN, msg)

+ 1 - 1
modules/log/xorm.go

@@ -101,7 +101,7 @@ func (l *XORMLogBridge) Infof(format string, v ...interface{}) {
101 101
 	}
102 102
 }
103 103
 
104
-// Warn show warnning log
104
+// Warn show warning log
105 105
 func (l *XORMLogBridge) Warn(v ...interface{}) {
106 106
 	if l.level <= core.LOG_WARNING {
107 107
 		msg := fmt.Sprint(v...)

+ 1 - 1
modules/mailer/mailer.go

@@ -146,7 +146,7 @@ func (s *smtpSender) Send(from string, to []string, msg io.WriterTo) error {
146 146
 		}
147 147
 	}
148 148
 
149
-	// If not using SMTPS, alway use STARTTLS if available
149
+	// If not using SMTPS, always use STARTTLS if available
150 150
 	hasStartTLS, _ := client.Extension("STARTTLS")
151 151
 	if !isSecureConn && hasStartTLS {
152 152
 		if err = client.StartTLS(tlsconfig); err != nil {

+ 1 - 1
modules/options/dynamic.go

@@ -76,7 +76,7 @@ func License(name string) ([]byte, error) {
76 76
 	return fileFromDir(path.Join("license", name))
77 77
 }
78 78
 
79
-// Labels eads the content of a specific labels from static or custom path.
79
+// Labels reads the content of a specific labels from static or custom path.
80 80
 func Labels(name string) ([]byte, error) {
81 81
 	return fileFromDir(path.Join("label", name))
82 82
 }

+ 1 - 1
modules/options/static.go

@@ -72,7 +72,7 @@ func License(name string) ([]byte, error) {
72 72
 	return fileFromDir(path.Join("license", name))
73 73
 }
74 74
 
75
-// Labels eads the content of a specific labels from static or custom path.
75
+// Labels reads the content of a specific labels from static or custom path.
76 76
 func Labels(name string) ([]byte, error) {
77 77
 	return fileFromDir(path.Join("label", name))
78 78
 }

+ 2 - 2
modules/setting/setting.go

@@ -249,7 +249,7 @@ var (
249 249
 		},
250 250
 	}
251 251
 
252
-	// Markdown sttings
252
+	// Markdown settings
253 253
 	Markdown = struct {
254 254
 		EnableHardLineBreak bool
255 255
 		CustomURLSchemes    []string `ini:"CUSTOM_URL_SCHEMES"`
@@ -420,7 +420,7 @@ var (
420 420
 	Names     []string
421 421
 	dateLangs map[string]string
422 422
 
423
-	// Highlight settings are loaded in modules/template/hightlight.go
423
+	// Highlight settings are loaded in modules/template/highlight.go
424 424
 
425 425
 	// Other settings
426 426
 	ShowFooterBranding         bool

+ 1 - 1
modules/sync/exclusive_pool.go

@@ -39,7 +39,7 @@ func NewExclusivePool() *ExclusivePool {
39 39
 }
40 40
 
41 41
 // CheckIn checks in an instance to the pool and hangs while instance
42
-// with same indentity is using the lock.
42
+// with same identity is using the lock.
43 43
 func (p *ExclusivePool) CheckIn(identity string) {
44 44
 	p.lock.Lock()
45 45
 

+ 1 - 1
modules/sync/unique_queue.go

@@ -36,7 +36,7 @@ func (q *UniqueQueue) Queue() <-chan string {
36 36
 	return q.queue
37 37
 }
38 38
 
39
-// Exist returns true if there is an instance with given indentity
39
+// Exist returns true if there is an instance with given identity
40 40
 // exists in the queue.
41 41
 func (q *UniqueQueue) Exist(id interface{}) bool {
42 42
 	return q.table.IsRunning(com.ToStr(id))