From 90d1349665028c617db620644e31f8a999f42ed7 Mon Sep 17 00:00:00 2001 From: astaxie Date: Sun, 17 Jan 2016 23:48:17 +0800 Subject: [PATCH] fix typo --- config/json.go | 2 +- doc.go | 2 +- orm/orm_conds.go | 2 +- orm/qb_mysql.go | 2 +- plugins/apiauth/apiauth.go | 2 +- session/sess_cookie_test.go | 4 ++-- template.go | 2 +- templatefunc.go | 2 +- utils/captcha/captcha.go | 4 ++-- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/config/json.go b/config/json.go index 6929baad..65b4ac48 100644 --- a/config/json.go +++ b/config/json.go @@ -164,7 +164,7 @@ func (c *JSONConfigContainer) String(key string) string { // DefaultString returns the string value for a given key. // if err != nil return defaltval func (c *JSONConfigContainer) DefaultString(key string, defaultval string) string { - // TODO FIXME should not use "" to replace non existance + // TODO FIXME should not use "" to replace non existence if v := c.String(key); v != "" { return v } diff --git a/doc.go b/doc.go index 4be305b3..8825bd29 100644 --- a/doc.go +++ b/doc.go @@ -12,6 +12,6 @@ beego is inspired by Tornado, Sinatra and Flask with the added benefit of some G beego.Run() } -more infomation: http://beego.me +more information: http://beego.me */ package beego diff --git a/orm/orm_conds.go b/orm/orm_conds.go index b2eae418..e56d6fbb 100644 --- a/orm/orm_conds.go +++ b/orm/orm_conds.go @@ -19,7 +19,7 @@ import ( "strings" ) -// ExprSep define the expression seperation +// ExprSep define the expression separation const ( ExprSep = "__" ) diff --git a/orm/qb_mysql.go b/orm/qb_mysql.go index f6d1e185..886bc50e 100644 --- a/orm/qb_mysql.go +++ b/orm/qb_mysql.go @@ -20,7 +20,7 @@ import ( "strings" ) -// CommaSpace is the seperation +// CommaSpace is the separation const CommaSpace = ", " // MySQLQueryBuilder is the SQL build diff --git a/plugins/apiauth/apiauth.go b/plugins/apiauth/apiauth.go index 3091c698..8af08088 100644 --- a/plugins/apiauth/apiauth.go +++ b/plugins/apiauth/apiauth.go @@ -41,7 +41,7 @@ // // 1. appid // -// appid is asigned to the application +// appid is assigned to the application // // 2. signature // diff --git a/session/sess_cookie_test.go b/session/sess_cookie_test.go index b5982260..209e501c 100644 --- a/session/sess_cookie_test.go +++ b/session/sess_cookie_test.go @@ -80,7 +80,7 @@ func TestDestorySessionCookie(t *testing.T) { t.Fatal("get cookie session id is not the same again.") } - // After destory session , will get a new session id . + // After destroy session , will get a new session id . globalSessions.SessionDestroy(w, r1) r2, _ := http.NewRequest("GET", "/", nil) r2.Header.Set("Cookie", w.Header().Get("Set-Cookie")) @@ -91,6 +91,6 @@ func TestDestorySessionCookie(t *testing.T) { t.Fatal("session start error") } if newSession.SessionID() == session.SessionID() { - t.Fatal("after destory session and reqeust again ,get cookie session id is same.") + t.Fatal("after destroy session and reqeust again ,get cookie session id is same.") } } diff --git a/template.go b/template.go index 9aac3ea2..0ff2eea0 100644 --- a/template.go +++ b/template.go @@ -31,7 +31,7 @@ var ( beegoTplFuncMap = make(template.FuncMap) // BeeTemplates caching map and supported template file extensions. BeeTemplates = make(map[string]*template.Template) - // BeeTemplateExt stores the template extention which will build + // BeeTemplateExt stores the template extension which will build BeeTemplateExt = []string{"tpl", "html"} ) diff --git a/templatefunc.go b/templatefunc.go index e944bc73..bc265321 100644 --- a/templatefunc.go +++ b/templatefunc.go @@ -670,7 +670,7 @@ func MapGet(arg1 interface{}, arg2 ...interface{}) (interface{}, error) { if arg1Type.Kind() == reflect.Map && len(arg2) > 0 { // check whether arg2[0] type equals to arg1 key type - // if they are different, make convertion + // if they are different, make conversion arg2Val := reflect.ValueOf(arg2[0]) arg2Type := reflect.TypeOf(arg2[0]) if arg2Type.Kind() != arg1Type.Key().Kind() { diff --git a/utils/captcha/captcha.go b/utils/captcha/captcha.go index 4ac5c9f9..31098f9a 100644 --- a/utils/captcha/captcha.go +++ b/utils/captcha/captcha.go @@ -158,7 +158,7 @@ func (c *Captcha) Handler(ctx *context.Context) { } } -// CreateCaptchaHTML tempalte func for output html +// CreateCaptchaHTML template func for output html func (c *Captcha) CreateCaptchaHTML() template.HTML { value, err := c.CreateCaptcha() if err != nil { @@ -255,7 +255,7 @@ func NewCaptcha(urlPrefix string, store cache.Cache) *Captcha { } // NewWithFilter create a new captcha.Captcha and auto AddFilter for serve captacha image -// and add a tempalte func for output html +// and add a template func for output html func NewWithFilter(urlPrefix string, store cache.Cache) *Captcha { cpt := NewCaptcha(urlPrefix, store)