docs(): update readme

This commit is contained in:
Espoir
2021-08-26 23:12:11 +08:00
parent 73b8b9d098
commit df7163a78e
3 changed files with 22 additions and 20 deletions
+6 -14
View File
@@ -17,7 +17,12 @@ import (
type NotifyService struct {
}
func SendTextMessage(content string) error {
//@author: [Espoir](https://github.com/nightsimon)
//@function: NotifyController
//@description: 钉钉通知测试
//@return: err error
func (e *NotifyService) SendTextMessage(content string) error {
msg := map[string]interface{}{
"msgtype": "text",
"text": map[string]string{
@@ -99,16 +104,3 @@ func sign(t int64, secret string) string {
data := hmac256.Sum(nil)
return base64.StdEncoding.EncodeToString(data)
}
//@author: [Espoir](https://github.com/nightsimon)
//@function: NotifyController
//@description: 钉钉通知测试
//@return: err error
func (e *NotifyService) Send() (err error) {
err = SendTextMessage("test")
if err != nil {
return err
}
return err
}