From 0a84b9124279238809a0e8442af82df95bd3f647 Mon Sep 17 00:00:00 2001 From: Pawan Pinjarkar Date: Thu, 12 Feb 2026 18:38:08 -0500 Subject: [PATCH] NO-ISSUE: Fix linting issues --- tools/agent_tui/ui/controller.go | 5 ++--- .../ui/rendezvous_ip_connectivity_fail_modal.go | 4 ++-- .../ui/rendezvous_ip_save_success_modal.go | 4 ++-- tools/agent_tui/ui/rendezvous_ip_select.go | 14 ++++++-------- 4 files changed, 12 insertions(+), 15 deletions(-) diff --git a/tools/agent_tui/ui/controller.go b/tools/agent_tui/ui/controller.go index bc061005..84cea700 100644 --- a/tools/agent_tui/ui/controller.go +++ b/tools/agent_tui/ui/controller.go @@ -9,9 +9,8 @@ type Controller struct { ui *UI channel chan checks.CheckResult - checks map[string]checks.CheckResult - state bool - rendezvousIPSet bool + checks map[string]checks.CheckResult + state bool } func NewController(ui *UI) *Controller { diff --git a/tools/agent_tui/ui/rendezvous_ip_connectivity_fail_modal.go b/tools/agent_tui/ui/rendezvous_ip_connectivity_fail_modal.go index 1b525de4..067e005b 100644 --- a/tools/agent_tui/ui/rendezvous_ip_connectivity_fail_modal.go +++ b/tools/agent_tui/ui/rendezvous_ip_connectivity_fail_modal.go @@ -7,9 +7,9 @@ import ( const ( PAGE_RENDEZVOUS_IP_CONNECTIVITY_FAIL string = "rendezvousIPConnectivityFailPage" - SAVE_AND_CONTINUE_BUTTON = "" + SAVE_AND_CONTINUE_BUTTON string = "" - CONNECTIVITY_CHECK_FAIL_TEXT_FORMAT = "Warning: the specified rendezvous IP was not found or yet active." + CONNECTIVITY_CHECK_FAIL_TEXT_FORMAT string = "Warning: the specified rendezvous IP was not found or yet active." ) func (u *UI) showRendezvousIPConnectivityFailModal(ipAddress string, focusForBackButton func()) { diff --git a/tools/agent_tui/ui/rendezvous_ip_save_success_modal.go b/tools/agent_tui/ui/rendezvous_ip_save_success_modal.go index 51e9adb3..a996ad88 100644 --- a/tools/agent_tui/ui/rendezvous_ip_save_success_modal.go +++ b/tools/agent_tui/ui/rendezvous_ip_save_success_modal.go @@ -9,8 +9,8 @@ import ( const ( PAGE_RENDEZVOUS_IP_SAVE_SUCCESS string = "rendezvousIPSaveSuccessPage" - CONTINUE_BUTTON = "" - BACK_BUTTON = "" + CONTINUE_BUTTON string = "" + BACK_BUTTON string = "" SUCCESS_TEXT_FORMAT = "Successfully saved %s as the rendezvous node IP. " OTHER_NODES_TEXT_FORMAT = "Enter %s as the rendezvous node IP on the other nodes that will form the cluster." diff --git a/tools/agent_tui/ui/rendezvous_ip_select.go b/tools/agent_tui/ui/rendezvous_ip_select.go index 21e5c1b9..ed9083aa 100644 --- a/tools/agent_tui/ui/rendezvous_ip_select.go +++ b/tools/agent_tui/ui/rendezvous_ip_select.go @@ -26,7 +26,7 @@ func (u *UI) createSelectHostIPPage() { u.selectIPList.SetInputCapture(getSelectIPListInputCapture(u.selectIPList)) } - descriptionText := fmt.Sprintf("Select an IP address from this node to be the rendezvous node IP.") + descriptionText := "Select an IP address from this node to be the rendezvous node IP." textFlex := u.createTextFlex(descriptionText) textRows := 3 @@ -82,9 +82,7 @@ func getSelectIPListInputCapture(list *tview.List) (capture func(event *tcell.Ev // List.GetCurrentItem actually returns not the current selected item but the // item that was last selected previousItemIndex := list.GetCurrentItem() - previousItem, _ := list.GetItemText(previousItemIndex) - currentItem := previousItem - updatedItemIndex := previousItemIndex + switch event.Key() { case tcell.KeyTab, tcell.KeyDown, tcell.KeyRight: currentItemIndex := previousItemIndex + 1 @@ -92,10 +90,10 @@ func getSelectIPListInputCapture(list *tview.List) (capture func(event *tcell.Ev // reached the bottom of the selectIPList currentItemIndex = 0 } - currentItem, _ = list.GetItemText(currentItemIndex) + currentItem, _ := list.GetItemText(currentItemIndex) if currentItem == EMPTY_OPTION { // move the current index up one place to skip the EMPTY_OPTION - updatedItemIndex = currentItemIndex + updatedItemIndex := currentItemIndex if updatedItemIndex > list.GetItemCount() { // reached the bottom of the list updatedItemIndex = 0 @@ -108,10 +106,10 @@ func getSelectIPListInputCapture(list *tview.List) (capture func(event *tcell.Ev // reached the top of the selectIPList currentItemIndex = list.GetItemCount() - 1 } - currentItem, _ = list.GetItemText(currentItemIndex) + currentItem, _ := list.GetItemText(currentItemIndex) if currentItem == EMPTY_OPTION { // move the current index down one place to skip the EMPTY_OPTION - updatedItemIndex = currentItemIndex + updatedItemIndex := currentItemIndex if updatedItemIndex < 0 { updatedItemIndex = list.GetItemCount() - 1 }