mirror of
https://github.com/Mrs4s/go-cqhttp.git
synced 2025-05-05 03:23:49 +08:00
go fmt
This commit is contained in:
parent
fc18b84d4b
commit
bcdbefb355
@ -44,12 +44,12 @@ func QQMusicSongInfo(id string) (gjson.Result, error) {
|
|||||||
return gjson.ParseBytes(d).Get("songinfo.data"), nil
|
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
|
var serviceid string
|
||||||
if ResId == 0{
|
if ResId == 0 {
|
||||||
serviceid ="2" //默认值2
|
serviceid = "2" //默认值2
|
||||||
}else{
|
} else {
|
||||||
serviceid = strconv.FormatInt(ResId,10)
|
serviceid = strconv.FormatInt(ResId, 10)
|
||||||
}
|
}
|
||||||
//println(serviceid)
|
//println(serviceid)
|
||||||
return &message.ServiceElement{
|
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{
|
return &message.ServiceElement{
|
||||||
Id: 1,
|
Id: 1,
|
||||||
Content: template,
|
Content: template,
|
||||||
|
@ -400,7 +400,6 @@ func getParamOrDefault(c *gin.Context, k, def string) string {
|
|||||||
return def
|
return def
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func getParam(c *gin.Context, k string) string {
|
func getParam(c *gin.Context, k string) string {
|
||||||
p, _ := getParamWithType(c, k)
|
p, _ := getParamWithType(c, k)
|
||||||
return p
|
return p
|
||||||
|
Loading…
x
Reference in New Issue
Block a user