Skip to content

Commit

Permalink
go fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
eddycjy committed Jun 12, 2018
1 parent e762b80 commit 7038796
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package main
import (
"fmt"
"log"
"syscall"
"net/http"
"runtime"
"syscall"

"github.com/fvbock/endless"

Expand Down
2 changes: 1 addition & 1 deletion models/tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func AddTag(name string, state int, createdBy string) error {

func GetTags(pageNum int, pageSize int, maps interface{}) ([]Tag, error) {
var tags []Tag
if pageSize > 0 && pageNum > 0{
if pageSize > 0 && pageNum > 0 {
db = db.Offset(pageNum).Limit(pageSize)
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/app/response.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package app

import (
"github.com/gin-gonic/gin"
"github.com/gin-gonic/gin"

"github.com/EDDYCJY/go-gin-example/pkg/e"
"github.com/EDDYCJY/go-gin-example/pkg/e"
)

type Gin struct {
Expand Down
4 changes: 2 additions & 2 deletions pkg/e/msg.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ var MsgFlags = map[int]string{
ERROR_ADD_TAG_FAIL: "新增标签失败",
ERROR_EDIT_TAG_FAIL: "修改标签失败",
ERROR_DELETE_TAG_FAIL: "删除标签失败",
ERROR_EXPORT_TAG_FAIL: "导出标签失败",
ERROR_IMPORT_TAG_FAIL: "导入标签失败",
ERROR_EXPORT_TAG_FAIL: "导出标签失败",
ERROR_IMPORT_TAG_FAIL: "导入标签失败",
ERROR_NOT_EXIST_ARTICLE: "该文章不存在",
ERROR_ADD_ARTICLE_FAIL: "新增文章失败",
ERROR_DELETE_ARTICLE_FAIL: "删除文章失败",
Expand Down
2 changes: 1 addition & 1 deletion pkg/export/excel.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ func GetExcelPath() string {

func GetExcelFullPath() string {
return setting.AppSetting.RuntimeRootPath + GetExcelPath()
}
}
8 changes: 4 additions & 4 deletions routers/api/v1/tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import (

"github.com/EDDYCJY/go-gin-example/pkg/app"
"github.com/EDDYCJY/go-gin-example/pkg/e"
"github.com/EDDYCJY/go-gin-example/pkg/export"
"github.com/EDDYCJY/go-gin-example/pkg/logging"
"github.com/EDDYCJY/go-gin-example/pkg/setting"
"github.com/EDDYCJY/go-gin-example/pkg/util"
"github.com/EDDYCJY/go-gin-example/service/tag_service"
"github.com/EDDYCJY/go-gin-example/pkg/export"
"github.com/EDDYCJY/go-gin-example/pkg/logging"
)

// @Summary 获取多个文章标签
Expand Down Expand Up @@ -216,7 +216,7 @@ func ExportTag(c *gin.Context) {
}

tagService := tag_service.Tag{
Name: name,
Name: name,
State: state,
}

Expand Down Expand Up @@ -256,4 +256,4 @@ func ImportTag(c *gin.Context) {
}

appG.Response(http.StatusOK, e.SUCCESS, nil)
}
}
2 changes: 1 addition & 1 deletion routers/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import (
"github.com/swaggo/gin-swagger/swaggerFiles"

"github.com/EDDYCJY/go-gin-example/middleware/jwt"
"github.com/EDDYCJY/go-gin-example/pkg/export"
"github.com/EDDYCJY/go-gin-example/pkg/setting"
"github.com/EDDYCJY/go-gin-example/pkg/upload"
"github.com/EDDYCJY/go-gin-example/routers/api"
"github.com/EDDYCJY/go-gin-example/routers/api/v1"
"github.com/EDDYCJY/go-gin-example/pkg/export"
)

func InitRouter() *gin.Engine {
Expand Down
4 changes: 2 additions & 2 deletions service/tag_service/tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ import (
"encoding/json"
"strconv"
"time"
"io"

"github.com/tealeg/xlsx"

"github.com/360EntSecGroup-Skylar/excelize"
"github.com/EDDYCJY/go-gin-example/models"
"github.com/EDDYCJY/go-gin-example/pkg/export"
"github.com/EDDYCJY/go-gin-example/pkg/gredis"
"github.com/EDDYCJY/go-gin-example/pkg/logging"
"github.com/EDDYCJY/go-gin-example/service/cache_service"
"io"
"github.com/360EntSecGroup-Skylar/excelize"
)

type Tag struct {
Expand Down

0 comments on commit 7038796

Please sign in to comment.