release revsuit vBeta0.1.0 (#15)

Co-authored-by: E99p1ant <[email protected]>
This commit is contained in:
Li4n0
2021-05-16 12:11:35 +08:00
committed by GitHub
co-authored by E99p1ant
parent b39ee101f9
commit 5b63e90390
98 changed files with 2357 additions and 623 deletions
+7 -3
View File
@@ -41,7 +41,11 @@ type larkPayload struct {
Card larkCard `json:"card"`
}
func (d *Lark) buildPayload(r record.Record) string {
func (l *Lark) name() string {
return "Lark"
}
func (l *Lark) buildPayload(r record.Record) string {
payload := larkPayload{
MsgType: "interactive",
Card: larkCard{
@@ -69,8 +73,8 @@ func (d *Lark) buildPayload(r record.Record) string {
return string(p)
}
func (d *Lark) notice(r record.Record) error {
resp, err := http.Post(d.URL, "application/json", strings.NewReader(d.buildPayload(r)))
func (l *Lark) notice(r record.Record) error {
resp, err := http.Post(l.URL, "application/json", strings.NewReader(l.buildPayload(r)))
if err != nil {
return errors.Wrap(err, "HTTP request")
}