You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//importimport n "github.com/rakutentech/go-alertnotification"err:=errors.New("Alert me")
ignoringErrs:= []error{errors.New("Ignore 001"), errors.New("Ignore 002")};
//Create New Alertalert:=n.NewAlert(err, ignoringErrs)
//Send notificationalert.Notify()
With customized fields
import n "github.com/rakutentech/go-alertnotification"//Create expandos, can keep the field value as configured by removing that field from expandosexpandos:=&n.Expandos{
EmailBody: "This is the customized email body",
EmailSubject: "This is the customized email subject",
MsTeamsCardSubject: "This is the customized MS Teams card summary",
MsTeamsAlertCardSubject: "This is the customized MS Teams card title",
MsTeamsError: "This is the customized MS Teams card error message",
}
//Create New Alertalert:=n.NewAlertWithExpandos(err, ignoringErr, expandos)
//Send notificationalert.Notify()
// To remove all current throttlingalert.RemoveCurrentThrotting()
About
Go Package to notify app alerts to Email and MS teams using Webhook