Initialize context in NewApp function and fix indentation issue in fetchLogs function.

This commit is contained in:
Benjamin Arntzen
2024-06-27 05:54:10 +01:00
committed by Benjamin Arntzen (aider)
parent 2ee75bb76f
commit 0bf5b0e853
+2 -1
View File
@@ -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)