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
+3 -1
View File
@@ -4,6 +4,7 @@ import (
"sync"
"github.com/li4n0/revsuit/internal/record"
"github.com/pkg/errors"
log "unknwon.dev/clog/v2"
)
@@ -14,6 +15,7 @@ var (
// Bot is used to send notice
type Bot interface {
name() string
notice(record.Record) error
buildPayload(record.Record) string
}
@@ -41,7 +43,7 @@ func (a *Announcer) AddBot(b Bot) *Announcer {
func Notice(r record.Record) {
for _, bot := range announcer.Bots {
if err := bot.notice(r); err != nil {
log.Warn(err.Error())
log.Warn(errors.Wrap(err, "%s notice failed").Error(), bot.name())
}
}
}