From 313dfa6f1ff8a0d17667ef626cb7b44c47ee541a Mon Sep 17 00:00:00 2001 From: KeisukeYamashita <19yamashita15@gmail.com> Date: Thu, 19 Nov 2020 01:11:11 +0900 Subject: [PATCH] Preallocate widget var Signed-off-by: KeisukeYamashita <19yamashita15@gmail.com> --- outputs/googlechat.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/outputs/googlechat.go b/outputs/googlechat.go index 1e60a274f0..da3a577184 100644 --- a/outputs/googlechat.go +++ b/outputs/googlechat.go @@ -37,7 +37,7 @@ type googlechatPayload struct { func newGooglechatPayload(falcopayload types.FalcoPayload, config *types.Configuration) googlechatPayload { var messageText string - var widgets []widget + widgets := []widget{} if config.Googlechat.MessageFormatTemplate != nil { buf := &bytes.Buffer{}