From bcdbefb355b11b783a017114a9e84ebd368b4bb1 Mon Sep 17 00:00:00 2001 From: scjtqs Date: Sun, 30 Aug 2020 02:29:29 +0800 Subject: [PATCH] go fmt --- global/net.go | 12 ++++++------ server/http.go | 1 - 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/global/net.go b/global/net.go index b0bf936..9abcbe5 100644 --- a/global/net.go +++ b/global/net.go @@ -44,12 +44,12 @@ func QQMusicSongInfo(id string) (gjson.Result, error) { return gjson.ParseBytes(d).Get("songinfo.data"), nil } -func NewXmlMsg(template string,ResId int64) *message.ServiceElement{ +func NewXmlMsg(template string, ResId int64) *message.ServiceElement { var serviceid string - if ResId == 0{ - serviceid ="2" //默认值2 - }else{ - serviceid = strconv.FormatInt(ResId,10) + if ResId == 0 { + serviceid = "2" //默认值2 + } else { + serviceid = strconv.FormatInt(ResId, 10) } //println(serviceid) return &message.ServiceElement{ @@ -60,7 +60,7 @@ func NewXmlMsg(template string,ResId int64) *message.ServiceElement{ } } -func NewJsonMsg(template string) *message.ServiceElement{ +func NewJsonMsg(template string) *message.ServiceElement { return &message.ServiceElement{ Id: 1, Content: template, diff --git a/server/http.go b/server/http.go index ad864f5..168856b 100644 --- a/server/http.go +++ b/server/http.go @@ -400,7 +400,6 @@ func getParamOrDefault(c *gin.Context, k, def string) string { return def } - func getParam(c *gin.Context, k string) string { p, _ := getParamWithType(c, k) return p