From 39c068400e9dd3a577580faa41e87140c2d2e499 Mon Sep 17 00:00:00 2001 From: Joseph Crail Date: Sat, 6 Dec 2014 20:22:48 -0500 Subject: [PATCH] Fix spelling errors in comments. --- models/action.go | 2 +- models/login.go | 6 +++--- models/models.go | 2 +- models/oauth2.go | 2 +- models/org.go | 4 ++-- models/repo.go | 4 ++-- models/user.go | 6 +++--- models/webhook.go | 2 +- modules/auth/auth.go | 2 +- modules/auth/ldap/ldap.go | 4 ++-- modules/avatar/avatar.go | 2 +- modules/ldap/debug.go | 2 +- modules/log/log.go | 2 +- modules/mahonia/charset.go | 2 +- modules/middleware/repo.go | 2 +- modules/setting/setting.go | 2 +- routers/repo/issue.go | 2 +- 17 files changed, 24 insertions(+), 24 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 diff --git a/modules/auth/auth.go b/modules/auth/auth.go index 450cdb37e9..acf4bf02ef 100644 --- a/modules/auth/auth.go +++ b/modules/auth/auth.go @@ -80,7 +80,7 @@ func SignedInUser(req *http.Request, sess session.Store) (*models.User, bool) { return nil, false } - // Check if enabled auto-registeration. + // Check if enabled auto-registration. if setting.Service.EnableReverseProxyAutoRegister { u := &models.User{ Name: webAuthUser, diff --git a/modules/auth/ldap/ldap.go b/modules/auth/ldap/ldap.go index 79b59519e2..44c130a104 100644 --- a/modules/auth/ldap/ldap.go +++ b/modules/auth/ldap/ldap.go @@ -20,7 +20,7 @@ type Ldapsource struct { Port int // port number UseSSL bool // Use SSL BaseDN string // Base DN - Attributes string // Attribut to search + Attributes string // Attribute to search Filter string // Query filter to validate entry MsAdSAFormat string // in the case of MS AD Simple Authen, the format to use (see: http://msdn.microsoft.com/en-us/library/cc223499.aspx) Enabled bool // if this source is disabled @@ -37,7 +37,7 @@ func AddSource(name string, host string, port int, usessl bool, basedn string, a Authensource = append(Authensource, ldaphost) } -//LoginUser : try to login an user to LDAP sources, return requested (attribut,true) if ok, ("",false) other wise +//LoginUser : try to login an user to LDAP sources, return requested (attribute,true) if ok, ("",false) other wise //First match wins //Returns first attribute if exists func LoginUser(name, passwd string) (a string, r bool) { diff --git a/modules/avatar/avatar.go b/modules/avatar/avatar.go index 225d6c8183..c0a71f11de 100644 --- a/modules/avatar/avatar.go +++ b/modules/avatar/avatar.go @@ -46,7 +46,7 @@ func init() { } // hash email to md5 string -// keep this func in order to make this package indenpent +// keep this func in order to make this package independent func HashEmail(email string) string { // https://en.gravatar.com/site/implement/hash/ email = strings.TrimSpace(email) diff --git a/modules/ldap/debug.go b/modules/ldap/debug.go index 8653a47b45..67856fe7a6 100644 --- a/modules/ldap/debug.go +++ b/modules/ldap/debug.go @@ -6,7 +6,7 @@ import ( "github.com/gogits/gogs/modules/asn1-ber" ) -// debbuging type +// debugging type // - has a Printf method to write the debug output type debugging bool diff --git a/modules/log/log.go b/modules/log/log.go index 4fb74d40c8..82492ce3fa 100644 --- a/modules/log/log.go +++ b/modules/log/log.go @@ -162,7 +162,7 @@ func newLogger(buffer int64) *Logger { return l } -// SetLogger sets new logger instanse with given logger adapter and config. +// SetLogger sets new logger instance with given logger adapter and config. func (l *Logger) SetLogger(adapter string, config string) error { l.lock.Lock() defer l.lock.Unlock() diff --git a/modules/mahonia/charset.go b/modules/mahonia/charset.go index 14fa3b883a..eef8ed3147 100644 --- a/modules/mahonia/charset.go +++ b/modules/mahonia/charset.go @@ -32,7 +32,7 @@ const ( ) // A Decoder is a function that decodes a character set, one character at a time. -// It works much like utf8.DecodeRune, but has an aditional status return value. +// It works much like utf8.DecodeRune, but has an additional status return value. type Decoder func(p []byte) (c rune, size int, status Status) // An Encoder is a function that encodes a character set, one character at a time. diff --git a/modules/middleware/repo.go b/modules/middleware/repo.go index 7cc7a6d813..8b0f0c59f7 100644 --- a/modules/middleware/repo.go +++ b/modules/middleware/repo.go @@ -453,7 +453,7 @@ func RequireTrueOwner() macaron.Handler { } } -// GitHookService checks if repsitory Git hooks service has been enabled. +// GitHookService checks if repository Git hooks service has been enabled. func GitHookService() macaron.Handler { return func(ctx *Context) { if !ctx.User.AllowGitHook && !ctx.User.IsAdmin { diff --git a/modules/setting/setting.go b/modules/setting/setting.go index b1efc9c7a8..7765a859ab 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -260,7 +260,7 @@ func NewConfigContext() { log.Fatal(4, "Expect user(%s) but current user is: %s", RunUser, curUser) } - // Determine and create root git reposiroty path. + // Determine and create root git repository path. homeDir, err := com.HomeDir() if err != nil { log.Fatal(4, "Fail to get home directory: %v", err) diff --git a/routers/repo/issue.go b/routers/repo/issue.go index 750f4e40c6..999fd0a892 100644 --- a/routers/repo/issue.go +++ b/routers/repo/issue.go @@ -628,7 +628,7 @@ func UpdateAssignee(ctx *middleware.Context) { } aid := com.StrTo(ctx.Query("assigneeid")).MustInt64() - // Not check for invalid assignne id and give responsibility to owners. + // Not check for invalid assignee id and give responsibility to owners. issue.AssigneeId = aid if err = models.UpdateIssueUserPairByAssignee(aid, issue.Id); err != nil { ctx.Handle(500, "UpdateIssueUserPairByAssignee: %v", err)