docs(): update readme
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user