Keep refine the structure.

This commit is contained in:
zicla
2019-04-26 02:38:53 +08:00
parent b3c52ea50e
commit 8edc30babc
11 changed files with 56 additions and 50 deletions

View File

@ -8,6 +8,7 @@ import (
"os"
"strings"
"tank/rest/config"
"tank/rest/logger"
"tank/rest/result"
"tank/rest/tool"
"time"
@ -71,7 +72,7 @@ func NewRouter() *Router {
func (this *Router) GlobalPanicHandler(writer http.ResponseWriter, request *http.Request, startTime time.Time) {
if err := recover(); err != nil {
tool.LOGGER.Error("错误: %v", err)
logger.LOGGER.Error("错误: %v", err)
var webResult *result.WebResult = nil
if value, ok := err.(string); ok {