(userEmail string, data dto.Notify)
| 56 | } |
| 57 | |
| 58 | func sendEmailNotify(userEmail string, data dto.Notify) error { |
| 59 | // make email content |
| 60 | content := data.Content |
| 61 | // 处理占位符 |
| 62 | for _, value := range data.Values { |
| 63 | content = strings.Replace(content, dto.ContentValueParam, fmt.Sprintf("%v", value), 1) |
| 64 | } |
| 65 | return common.SendEmail(data.Title, userEmail, content) |
| 66 | } |
no test coverage detected