INNER CODE UNIT · Go
func
prometheus-msteams/prometheus-msteams · pkg/card/converter.go:72
func (l loggingMiddleware) Convert(ctx context.Context, a webhook.Message) (c Office365ConnectorCard, err error) {
defer func(begin time.Time) {
if len(c.PotentialAction) > 5 {
l.logger.Log(
"warning", "There can only be a maximum of 5 actions in a potentialAction collection",
"actions", c.PotentialAction,
)
}
for _, s := range c.Sections {
if len(s.PotentialAction) > 5 {
l.logger.Log(
"warning", "There can only be a maximum of 5 actions in a potentialAction collection",
"actions", s.PotentialAction,
)
}
}