From f26f12ef98b985be172b07c5b6265556a598233f Mon Sep 17 00:00:00 2001 From: Sebastian Mark Date: Sun, 27 Oct 2024 21:32:57 +0100 Subject: [PATCH] format: improve variable declaration style MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - change variable declarations to use a grouped format 🤖 --- cmd/client/main.go | 3 ++- internal/frontend/desktop.go | 6 ++++-- internal/frontend/terminal.go | 6 ++++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/cmd/client/main.go b/cmd/client/main.go index 7fdb573..80f3c5b 100644 --- a/cmd/client/main.go +++ b/cmd/client/main.go @@ -13,7 +13,8 @@ import ( ) var ( - config ChronoTomato.Config + config ChronoTomato.Config + parameter_url = flag.String("url", "", "GoTomato Server URL (eg ws://localhost:8080/ws)") parameter_password = flag.String("password", "", "Control password for pomodoro session") configfile = flag.String("config", "", "Path to config file") diff --git a/internal/frontend/desktop.go b/internal/frontend/desktop.go index 7a5e6f4..ee47394 100644 --- a/internal/frontend/desktop.go +++ b/internal/frontend/desktop.go @@ -8,8 +8,10 @@ import ( func desktopNotifications(pomodoro GoTomato.ServerMessage) { - var duration int - var notification string + var ( + duration int + notification string + ) mode := pomodoro.Mode session := pomodoro.Session diff --git a/internal/frontend/terminal.go b/internal/frontend/terminal.go index eddc631..f29447d 100644 --- a/internal/frontend/terminal.go +++ b/internal/frontend/terminal.go @@ -8,8 +8,10 @@ import ( ) func terminalOutput(pomodoro GoTomato.ServerMessage) { - var modePrefix string - var timerOutput string + var ( + modePrefix string + timerOutput string + ) fmt.Print("\033[H\033[2J") // Clears the screen