From eb186027a0f2688b3a7b671590c910b99d0a73da Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 24 Feb 2026 15:53:09 +0000 Subject: [PATCH] chore: use range-over-integer (Go 1.22+) Co-Authored-By: Claude Opus 4.6 --- pkg/webview/actions.go | 2 +- pkg/ws/ws.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/webview/actions.go b/pkg/webview/actions.go index 5348020..303ba9d 100644 --- a/pkg/webview/actions.go +++ b/pkg/webview/actions.go @@ -235,7 +235,7 @@ func (a DoubleClickAction) Execute(ctx context.Context, wv *Webview) error { y := elem.BoundingBox.Y + elem.BoundingBox.Height/2 // Double click sequence - for i := 0; i < 2; i++ { + for i := range 2 { for _, eventType := range []string{"mousePressed", "mouseReleased"} { _, err := wv.client.Call(ctx, "Input.dispatchMouseEvent", map[string]any{ "type": eventType, diff --git a/pkg/ws/ws.go b/pkg/ws/ws.go index ea9cc03..f836952 100644 --- a/pkg/ws/ws.go +++ b/pkg/ws/ws.go @@ -425,7 +425,7 @@ func (c *Client) writePump() { // Batch queued messages n := len(c.send) - for i := 0; i < n; i++ { + for range n { w.Write([]byte{'\n'}) w.Write(<-c.send) }