summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorJoseph Crail <jbcrail@gmail.com>2014-12-06 20:22:48 -0500
committerJoseph Crail <jbcrail@gmail.com>2014-12-06 20:22:48 -0500
commit39c068400e9dd3a577580faa41e87140c2d2e499 (patch)
tree96f3d13fa2f884b845c7b1507c1de07927da1617 /models
parent47e7175b80d1f1bf05bd2da3a38c898596b12835 (diff)
downloadgitea-39c068400e9dd3a577580faa41e87140c2d2e499.tar.gz
gitea-39c068400e9dd3a577580faa41e87140c2d2e499.zip
Fix spelling errors in comments.
Diffstat (limited to 'models')
-rw-r--r--models/action.go2
-rw-r--r--models/login.go6
-rw-r--r--models/models.go2
-rw-r--r--models/oauth2.go2
-rw-r--r--models/org.go4
-rw-r--r--models/repo.go4
-rw-r--r--models/user.go6
-rw-r--r--models/webhook.go2
8 files changed, 14 insertions, 14 deletions
diff --git a/models/action.go b/models/action.go
index 269fd753e8..98a4f5a085 100644
--- a/models/action.go
+++ b/models/action.go
@@ -349,7 +349,7 @@ func NewRepoAction(u *User, repo *Repository) (err error) {
return err
}
-// TransferRepoAction adds new action for transfering repository.
+// TransferRepoAction adds new action for transferring repository.
func TransferRepoAction(u, newUser *User, repo *Repository) (err error) {
action := &Action{
ActUserId: u.Id,
diff --git a/models/login.go b/models/login.go
index 3986353192..125e110a40 100644
--- a/models/login.go
+++ b/models/login.go
@@ -41,7 +41,7 @@ var LoginTypes = map[LoginType]string{
SMTP: "SMTP",
}
-// Ensure structs implmented interface.
+// Ensure structs implemented interface.
var (
_ core.Conversion = &LDAPConfig{}
_ core.Conversion = &SMTPConfig{}
@@ -226,7 +226,7 @@ func UserSignIn(uname, passwd string) (*User, error) {
}
}
-// Query if name/passwd can login against the LDAP direcotry pool
+// Query if name/passwd can login against the LDAP directory pool
// Create a local user if success
// Return the same LoginUserPlain semantic
// FIXME: https://github.com/gogits/gogs/issues/672
@@ -318,7 +318,7 @@ func SmtpAuth(host string, port int, a smtp.Auth, useTls bool) error {
return ErrUnsupportedLoginType
}
-// Query if name/passwd can login against the LDAP direcotry pool
+// Query if name/passwd can login against the LDAP directory pool
// Create a local user if success
// Return the same LoginUserPlain semantic
func LoginUserSMTPSource(u *User, name, passwd string, sourceId int64, cfg *SMTPConfig, autoRegister bool) (*User, error) {
diff --git a/models/models.go b/models/models.go
index 92a579dfcc..92849f5856 100644
--- a/models/models.go
+++ b/models/models.go
@@ -107,7 +107,7 @@ func SetEngine() (err error) {
return fmt.Errorf("models.init(fail to connect to database): %v", err)
}
- // WARNNING: for serv command, MUST remove the output to os.stdout,
+ // WARNING: for serv command, MUST remove the output to os.stdout,
// so use log file to instead print to stdout.
logPath := path.Join(setting.LogRootPath, "xorm.log")
os.MkdirAll(path.Dir(logPath), os.ModePerm)
diff --git a/models/oauth2.go b/models/oauth2.go
index 46e8e492a3..d19e248c12 100644
--- a/models/oauth2.go
+++ b/models/oauth2.go
@@ -79,7 +79,7 @@ func UpdateOauth2(oa *Oauth2) error {
return err
}
-// GetOauthByUserId returns list of oauthes that are releated to given user.
+// GetOauthByUserId returns list of oauthes that are related to given user.
func GetOauthByUserId(uid int64) ([]*Oauth2, error) {
socials := make([]*Oauth2, 0, 5)
err := x.Find(&socials, Oauth2{Uid: uid})
diff --git a/models/org.go b/models/org.go
index 90e5a1f3a0..41611f8116 100644
--- a/models/org.go
+++ b/models/org.go
@@ -240,7 +240,7 @@ func IsOrganizationMember(orgId, uid int64) bool {
return has
}
-// IsPublicMembership returns ture if given user public his/her membership.
+// IsPublicMembership returns true if given user public his/her membership.
func IsPublicMembership(orgId, uid int64) bool {
has, _ := x.Where("uid=?", uid).And("org_id=?", orgId).And("is_public=?", true).Get(new(OrgUser))
return has
@@ -861,7 +861,7 @@ func GetTeamMembers(orgId, teamId int64) ([]*User, error) {
return us, err
}
-// GetUserTeams returns all teams that user belongs to in given origanization.
+// GetUserTeams returns all teams that user belongs to in given organization.
func GetUserTeams(orgId, uid int64) ([]*Team, error) {
tus := make([]*TeamUser, 0, 5)
if err := x.Where("uid=?", uid).And("org_id=?", orgId).Find(&tus); err != nil {
diff --git a/models/repo.go b/models/repo.go
index f2f810eb7e..be03ebd6cd 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -856,7 +856,7 @@ func UpdateRepository(repo *Repository) error {
return err
}
-// DeleteRepository deletes a repository for a user or orgnaztion.
+// DeleteRepository deletes a repository for a user or organization.
func DeleteRepository(uid, repoId int64, userName string) error {
repo := &Repository{Id: repoId, OwnerId: uid}
has, err := x.Get(repo)
@@ -1239,7 +1239,7 @@ func GitGcRepos() error {
// \__/\ / (____ /__| \___ >___| /
// \/ \/ \/ \/
-// Watch is connection request for receiving repository notifycation.
+// Watch is connection request for receiving repository notification.
type Watch struct {
Id int64
UserId int64 `xorm:"UNIQUE(watch)"`
diff --git a/models/user.go b/models/user.go
index a83051dbbd..7e6a6c824f 100644
--- a/models/user.go
+++ b/models/user.go
@@ -147,7 +147,7 @@ func (u *User) CustomAvatarPath() string {
}
// UploadAvatar saves custom avatar for user.
-// FIXME: splite uploads to different subdirs in case we have massive users.
+// FIXME: split uploads to different subdirs in case we have massive users.
func (u *User) UploadAvatar(data []byte) error {
u.UseCustomAvatar = true
@@ -584,7 +584,7 @@ func GetUserIdsByNames(names []string) []int64 {
return ids
}
-// UserCommit represtns a commit with validation of user.
+// UserCommit represents a commit with validation of user.
type UserCommit struct {
User *User
*git.Commit
@@ -651,7 +651,7 @@ func SearchUserByName(opt SearchOption) (us []*User, err error) {
return us, err
}
-// Follow is connection request for receiving user notifycation.
+// Follow is connection request for receiving user notification.
type Follow struct {
Id int64
UserId int64 `xorm:"unique(follow)"`
diff --git a/models/webhook.go b/models/webhook.go
index 33146b529a..8e112ac572 100644
--- a/models/webhook.go
+++ b/models/webhook.go
@@ -99,7 +99,7 @@ func (w *Webhook) UpdateEvent() error {
return err
}
-// HasPushEvent returns true if hook enbaled push event.
+// HasPushEvent returns true if hook enabled push event.
func (w *Webhook) HasPushEvent() bool {
if w.PushOnly {
return true