mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Clean code
This commit is contained in:
@@ -6,13 +6,7 @@
|
||||
package log
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/martini-contrib/render"
|
||||
|
||||
"github.com/gogits/logs"
|
||||
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
)
|
||||
|
||||
var logger *logs.BeeLogger
|
||||
@@ -41,9 +35,3 @@ func Warn(format string, v ...interface{}) {
|
||||
func Critical(format string, v ...interface{}) {
|
||||
logger.Critical(format, v...)
|
||||
}
|
||||
|
||||
func Handle(status int, title string, data base.TmplData, r render.Render, err error) {
|
||||
data["ErrorMsg"] = err
|
||||
Error("%s: %v", title, err)
|
||||
r.HTML(status, fmt.Sprintf("status/%d", status), data)
|
||||
}
|
||||
|
Reference in New Issue
Block a user