chore: refactor lint code

This commit is contained in:
duorameng
2026-05-12 18:42:18 +08:00
parent d187b1e1f3
commit d6b3ad6ae9
6 changed files with 19 additions and 17 deletions
+4 -3
View File
@@ -26,11 +26,12 @@ func (c *DtalkChannel) Send(config ChannelConfig, msg *Message) (*Result, error)
var res []byte
var err error
if contentType == FormatTypeText {
switch contentType {
case FormatTypeText:
res, err = cli.SendMessageText(formattedContent, atMobiles...)
} else if contentType == FormatTypeMarkdown {
case FormatTypeMarkdown:
res, err = cli.SendMessageMarkdown(msg.Title, formattedContent, atMobiles...)
} else {
default:
return SendError("未知的钉钉发送内容类型:%s", contentType), nil
}