lint fixes
This commit is contained in:
parent
b8cb8196c2
commit
24686ef501
2 changed files with 8 additions and 3 deletions
|
|
@ -4,14 +4,12 @@ stages:
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
stage: test
|
stage: test
|
||||||
only: ['main']
|
|
||||||
image: registry.gitlab.com/etke.cc/base
|
image: registry.gitlab.com/etke.cc/base
|
||||||
script:
|
script:
|
||||||
- make lint
|
- make lint
|
||||||
|
|
||||||
unit:
|
unit:
|
||||||
stage: test
|
stage: test
|
||||||
only: ['main']
|
|
||||||
image: registry.gitlab.com/etke.cc/base
|
image: registry.gitlab.com/etke.cc/base
|
||||||
script:
|
script:
|
||||||
- make test
|
- make test
|
||||||
|
|
|
||||||
|
|
@ -61,10 +61,17 @@ func (b *Bot) Error(ctx context.Context, roomID id.RoomID, message string, args
|
||||||
|
|
||||||
// Notice sends a notice message to the matrix room
|
// Notice sends a notice message to the matrix room
|
||||||
func (b *Bot) Notice(ctx context.Context, roomID id.RoomID, message string, args ...interface{}) {
|
func (b *Bot) Notice(ctx context.Context, roomID id.RoomID, message string, args ...interface{}) {
|
||||||
b.lp.Send(roomID, &event.MessageEventContent{
|
_, err := b.lp.Send(roomID, &event.MessageEventContent{
|
||||||
MsgType: event.MsgNotice,
|
MsgType: event.MsgNotice,
|
||||||
Body: fmt.Sprintf(message, args...),
|
Body: fmt.Sprintf(message, args...),
|
||||||
})
|
})
|
||||||
|
if err != nil {
|
||||||
|
if sentry.HasHubOnContext(ctx) {
|
||||||
|
sentry.GetHubFromContext(ctx).CaptureException(err)
|
||||||
|
} else {
|
||||||
|
sentry.CaptureException(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start performs matrix /sync
|
// Start performs matrix /sync
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue