From 0bf5b0e853f4f75b9b283661992b2aaa3e18ec50 Mon Sep 17 00:00:00 2001 From: Benjamin Arntzen Date: Thu, 27 Jun 2024 05:54:10 +0100 Subject: [PATCH] Initialize context in NewApp function and fix indentation issue in fetchLogs function. --- app.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app.go b/app.go index 33f63bb..23831fb 100644 --- a/app.go +++ b/app.go @@ -21,6 +21,7 @@ type App struct { func NewApp() *App { return &App{ ctx: context.Background(), + } } } @@ -54,7 +55,7 @@ func (a *App) fetchLogs() { if err != nil { fmt.Println("Error fetching logs:", err) continue - for _, log := range logs { + for _, log := range logs { if !processedLogs[log.MsgHash+log.Timestamp] { processedLogs[log.MsgHash+log.Timestamp] = true color := generateColor(log.MsgHash)