From df47f8c323fe017791cbbef04f89ad04d9c105f5 Mon Sep 17 00:00:00 2001 From: dushixiang Date: Fri, 19 Mar 2021 21:03:16 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=98=E6=98=AF=E4=BF=AE=E6=94=B9=E5=AF=BC?= =?UTF-8?q?=E5=8C=85=E9=A1=BA=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.go | 12 +++++++----- server/api/api.go | 3 ++- server/api/login-log.go | 3 ++- server/api/routes.go | 19 ++++++++++--------- 4 files changed, 21 insertions(+), 16 deletions(-) diff --git a/main.go b/main.go index 6c7255c..03aa5b0 100644 --- a/main.go +++ b/main.go @@ -3,15 +3,17 @@ package main import ( "bytes" "fmt" + "io" + "os" + + "next-terminal/server/api" + "next-terminal/server/config" + "next-terminal/server/global" + nested "github.com/antonfisher/nested-logrus-formatter" "github.com/labstack/gommon/log" "github.com/robfig/cron/v3" "github.com/sirupsen/logrus" - "io" - "next-terminal/server/api" - "next-terminal/server/config" - "next-terminal/server/global" - "os" ) const Version = "v0.3.4" diff --git a/server/api/api.go b/server/api/api.go index 0c4db84..074a2f3 100644 --- a/server/api/api.go +++ b/server/api/api.go @@ -1,10 +1,11 @@ package api import ( - "github.com/labstack/echo/v4" "next-terminal/server/constant" "next-terminal/server/global" "next-terminal/server/model" + + "github.com/labstack/echo/v4" ) type H map[string]interface{} diff --git a/server/api/login-log.go b/server/api/login-log.go index ec3e6df..a313bb6 100644 --- a/server/api/login-log.go +++ b/server/api/login-log.go @@ -4,9 +4,10 @@ import ( "strconv" "strings" + "next-terminal/server/global" + "github.com/labstack/echo/v4" "github.com/sirupsen/logrus" - "next-terminal/server/global" ) func LoginLogPagingEndpoint(c echo.Context) error { diff --git a/server/api/routes.go b/server/api/routes.go index 39b765f..8682c23 100644 --- a/server/api/routes.go +++ b/server/api/routes.go @@ -2,25 +2,26 @@ package api import ( "fmt" - "github.com/patrickmn/go-cache" - "github.com/sirupsen/logrus" - "gorm.io/driver/mysql" - "gorm.io/driver/sqlite" - "gorm.io/gorm" - "gorm.io/gorm/logger" "net/http" + "strconv" + "strings" + "time" + "next-terminal/server/global" "next-terminal/server/log" "next-terminal/server/model" "next-terminal/server/repository" "next-terminal/server/service" "next-terminal/server/utils" - "strconv" - "strings" - "time" "github.com/labstack/echo/v4" "github.com/labstack/echo/v4/middleware" + "github.com/patrickmn/go-cache" + "github.com/sirupsen/logrus" + "gorm.io/driver/mysql" + "gorm.io/driver/sqlite" + "gorm.io/gorm" + "gorm.io/gorm/logger" ) const Token = "X-Auth-Token"