逻辑错误发送到飞书
This commit is contained in:
parent
a1056a5556
commit
862d885d21
@ -5,6 +5,7 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"server/conf"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -14,10 +15,36 @@ const (
|
||||
func SendFeishuMsg(msg string) error {
|
||||
// 创建请求体
|
||||
payload := map[string]interface{}{
|
||||
"msg_type": "text",
|
||||
"content": map[string]string{
|
||||
"msg_type": "post",
|
||||
"content": map[string]interface{}{
|
||||
"post": map[string]interface{}{
|
||||
"zh_cn": map[string]interface{}{
|
||||
"title": "服务器报错提醒",
|
||||
"content": [][]map[string]interface{}{
|
||||
{
|
||||
{
|
||||
"tag": "text",
|
||||
"text": fmt.Sprintf("AppName:%s", conf.Server.GameName),
|
||||
// "style": []string{"bold", "lineThrough"},
|
||||
},
|
||||
},
|
||||
{
|
||||
{
|
||||
"tag": "text",
|
||||
"text": fmt.Sprintf("ServerName:%s", conf.Server.ServerName),
|
||||
// "style": []string{"bold", "lineThrough"},
|
||||
},
|
||||
},
|
||||
{
|
||||
{
|
||||
"tag": "text",
|
||||
"text": msg,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
payloadBytes, err := json.Marshal(payload)
|
||||
if err != nil {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user