Skip to content
Myr

style: remove optional return (#1036)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by 田欧 · committed by Javier Provecho Fernandez · parent c19aa05 · Browse files · 2 files+2 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+2 added−3 removed

  • other:+2 added−3 removed

2 files+2 added−3 removed

modified:auth.go-1 removed
56 unmodified lines
5758 // The user credentials was found, set user's id to key AuthUserKey in this context, the user's id can be read later using59 // c.MustGet(gin.AuthUserKey)60 c.Set(AuthUserKey, user)61 return61 }62}6364// BasicAuth returns a Basic HTTP Authorization middleware. It takes as argument a map[string]string where
31 unmodified lines
modified:gin.go+2 added-2 removed
156 unmodified lines
157 debugPrintLoadTemplate(template.Must(template.New("").Delims(engine.delims.Left, engine.delims.Right).Funcs(engine.FuncMap).ParseGlob(pattern)))158 engine.HTMLRender = render.HTMLDebug{Glob: pattern, FuncMap: engine.FuncMap, Delims: engine.delims}159 return160 }161162 templ := template.Must(template.New("").Delims(engine.delims.Left, engine.delims.Right).Funcs(engine.FuncMap).ParseGlob(pattern))163 engine.SetHTMLTemplate(templ)163 return164}165166func (engine *Engine) LoadHTMLFiles(files ...string) {167 if IsDebugging() {168 engine.HTMLRender = render.HTMLDebug{Files: files, FuncMap: engine.FuncMap, Delims: engine.delims}169 return170 }171172 templ := template.Must(template.New("").Delims(engine.delims.Left, engine.delims.Right).Funcs(engine.FuncMap).ParseFiles(files...))173 engine.SetHTMLTemplate(templ)173 return174}175176func (engine *Engine) SetHTMLTemplate(templ *template.Template) {177 if len(engine.trees) > 0 {
247 unmodified lines