Browse Source

feat: format code

pull/7/head
konenet 5 years ago
parent
commit
eef9f95837
  1. 1
      api/v1/group_router.go
  2. 1
      api/v1/user_router.go
  3. 2
      cmd/main.go
  4. 1
      common/util/file-suffix.go
  5. 2
      server/client.go
  6. 4
      test/proto_test.go

1
api/v1/group_router.go

@ -8,6 +8,7 @@ import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )
// 获取分组列表 // 获取分组列表
func GetGroup(c *gin.Context) { func GetGroup(c *gin.Context) {
uuid := c.Param("uuid") uuid := c.Param("uuid")

1
api/v1/user_router.go

@ -50,7 +50,6 @@ func ModifyUserInfo(c *gin.Context) {
c.JSON(http.StatusOK, response.SuccessMsg(nil)) c.JSON(http.StatusOK, response.SuccessMsg(nil))
} }
func GetUserDetails(c *gin.Context) { func GetUserDetails(c *gin.Context) {
uuid := c.Param("uuid") uuid := c.Param("uuid")

2
cmd/main.go

@ -1,8 +1,8 @@
package main package main
import ( import (
"chat-room/global/log"
"chat-room/config" "chat-room/config"
"chat-room/global/log"
"chat-room/router" "chat-room/router"
"chat-room/server" "chat-room/server"
"go.uber.org/zap" "go.uber.org/zap"

1
common/util/file-suffix.go

@ -51,7 +51,6 @@ func init() {
fileTypeMap.Store("52494646246009005741", "wav") //Wave (wav) fileTypeMap.Store("52494646246009005741", "wav") //Wave (wav)
fileTypeMap.Store("52494646", "wav") //Wave (wav) fileTypeMap.Store("52494646", "wav") //Wave (wav)
fileTypeMap.Store("52494646d07d60074156", "avi") fileTypeMap.Store("52494646d07d60074156", "avi")
fileTypeMap.Store("1a45dfa3a34286810142", "webm") fileTypeMap.Store("1a45dfa3a34286810142", "webm")

2
server/client.go

@ -40,7 +40,7 @@ func (c *Client) Read() {
Content: constant.PONG, Content: constant.PONG,
Type: constant.HEAT_BEAT, Type: constant.HEAT_BEAT,
} }
pongByte, err2 :=proto.Marshal(pong) pongByte, err2 := proto.Marshal(pong)
if nil != err2 { if nil != err2 {
log.Error("client marshal message error", log.Any("client marshal message error", err2.Error())) log.Error("client marshal message error", log.Any("client marshal message error", err2.Error()))
} }

4
test/proto_test.go

@ -1,5 +1 @@
package test package test
import (
)

Loading…
Cancel
Save