From 9d3c4e0a5eba8a5fc65003e9ae64a2f75775266f Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Sat, 31 Aug 2024 13:59:46 +0100 Subject: [PATCH] event: fix staticcheck warns --- event/event.go | 18 ------------------ event/event_test.go | 2 -- 2 files changed, 20 deletions(-) diff --git a/event/event.go b/event/event.go index 78b10f3..3ec8011 100644 --- a/event/event.go +++ b/event/event.go @@ -93,56 +93,45 @@ func processEvent(ev EventHandler, msg ReceivedData, events []EventType) { case EventWorkspace: // e.g. "1" (workspace number) ev.Workspace(WorkspaceName(raw[0])) - break case EventFocusedMonitor: // idk ev.FocusedMonitor(FocusedMonitor{ MonitorName: MonitorName(raw[0]), WorkspaceName: WorkspaceName(raw[1]), }) - break case EventActiveWindow: // e.g. jetbrains-goland,hyprland-ipc-ipc – main.go ev.ActiveWindow(ActiveWindow{ Name: raw[0], Title: raw[1], }) - - break case EventFullscreen: // e.g. "true" or "false" ev.Fullscreen(raw[0] == "1") - break case EventMonitorRemoved: // e.g. idk ev.MonitorRemoved(MonitorName(raw[0])) - break case EventMonitorAdded: // e.g. idk ev.MonitorAdded(MonitorName(raw[0])) - break case EventCreateWorkspace: // e.g. "1" (workspace number) ev.CreateWorkspace(WorkspaceName(raw[0])) - break case EventDestroyWorkspace: // e.g. "1" (workspace number) ev.DestroyWorkspace(WorkspaceName(raw[0])) - break case EventMoveWorkspace: // e.g. idk ev.MoveWorkspace(MoveWorkspace{ WorkspaceName: WorkspaceName(raw[0]), MonitorName: MonitorName(raw[1]), }) - break case EventActiveLayout: // e.g. AT Translated Set 2 keyboard,Russian ev.ActiveLayout(ActiveLayout{ Type: raw[0], Name: raw[1], }) - break case EventOpenWindow: // e.g. 80864f60,1,Alacritty,Alacritty ev.OpenWindow(OpenWindow{ @@ -151,38 +140,31 @@ func processEvent(ev EventHandler, msg ReceivedData, events []EventType) { Class: raw[2], Title: raw[3], }) - break case EventCloseWindow: // e.g. 5 ev.CloseWindow(CloseWindow{ Address: raw[0], }) - break case EventMoveWindow: // e.g. 5 ev.MoveWindow(MoveWindow{ Address: raw[0], WorkspaceName: WorkspaceName(raw[1]), }) - break case EventOpenLayer: // e.g. wofi ev.OpenLayer(OpenLayer(raw[0])) - break case EventCloseLayer: // e.g. wofi ev.CloseLayer(CloseLayer(raw[0])) - break case EventSubMap: // e.g. idk ev.SubMap(SubMap(raw[0])) - break case EventScreencast: ev.Screencast(Screencast{ Sharing: raw[0] == "1", Owner: raw[1], }) - break } } } diff --git a/event/event_test.go b/event/event_test.go index fdaebbf..a67a7d7 100644 --- a/event/event_test.go +++ b/event/event_test.go @@ -4,8 +4,6 @@ import ( "testing" ) -var ec *EventClient - var ( h = &FakeEventHandler{} c = &FakeEventClient{}