Commit ad446204 authored by 李世星's avatar 李世星

fix(修改钉钉格式): 202302151634

parent f1caed86
Pipeline #16348 passed with stage
in 0 seconds
...@@ -75,7 +75,7 @@ func CreateDingMessage(messageType string, msg interface{}, mobiles []string) DD ...@@ -75,7 +75,7 @@ func CreateDingMessage(messageType string, msg interface{}, mobiles []string) DD
func pluginNotice(msg interface{}) string { func pluginNotice(msg interface{}) string {
mateData := msg.(*entity.Matedata) mateData := msg.(*entity.Matedata)
templateBuff := bytes.NewBuffer([]byte{}) templateBuff := bytes.NewBuffer([]byte{})
templateBuff.WriteString(fmt.Sprintf("# 服务通知 \r\n > 【节点】:%s", mateData.SourceAgent)) templateBuff.WriteString(fmt.Sprintf("# 服务通知 \r\n + 【节点】:%s", mateData.SourceAgent))
for key, value := range mateData.Data { for key, value := range mateData.Data {
t := reflect.TypeOf(value).Kind().String() t := reflect.TypeOf(value).Kind().String()
if t == "map" { if t == "map" {
...@@ -93,7 +93,7 @@ func pluginNotice(msg interface{}) string { ...@@ -93,7 +93,7 @@ func pluginNotice(msg interface{}) string {
if t == "slice" { if t == "slice" {
value = fmt.Sprintf("%v", value) value = fmt.Sprintf("%v", value)
} }
templateBuff.WriteString(fmt.Sprintf(" \r\n > 【%s】:%s", key, value)) templateBuff.WriteString(fmt.Sprintf(" \r\n + 【%s】:%s", key, value))
} }
templateBuff.WriteString(fmt.Sprintf(" \r\n ###### %s", time.Now().Format("2006/01/02 15:04:05"))) templateBuff.WriteString(fmt.Sprintf(" \r\n ###### %s", time.Now().Format("2006/01/02 15:04:05")))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment