style: fix lint issues for line length and error handling
- commit
- 2157834a31b7505392222e8294cb1cb4b67d2b0b
- author
- brice · · 2026-01-29 04:19 UTC
- parent
- fe663f6
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
2 files · +9 -4
M internal/ui/coordinator/content.go +6 -1
| @@ -1461,7 +1461,12 @@ func (c *ContentCoordinator) setupWebViewCallbacks(ctx context.Context, paneID e | |||
| 1461 | 1461 | // Check for external URL schemes (vscode://, vscode-insiders://, spotify://, etc.) | |
| 1462 | 1462 | // These are typically triggered by JavaScript redirects (window.location) | |
| 1463 | 1463 | isExternal := urlutil.IsExternalScheme(uri) | |
| 1464 | - | log.Debug().Str("pane_id", string(paneID)).Str("uri", uri).Bool("is_external", isExternal).Bool("is_loading", wv.IsLoading()).Msg("OnURIChanged") | |
| 1464 | + | log.Debug(). | |
| 1465 | + | Str("pane_id", string(paneID)). | |
| 1466 | + | Str("uri", uri). | |
| 1467 | + | Bool("is_external", isExternal). | |
| 1468 | + | Bool("is_loading", wv.IsLoading()). | |
| 1469 | + | Msg("OnURIChanged") | |
| 1465 | 1470 | ||
| 1466 | 1471 | if isExternal { | |
| 1467 | 1472 | log.Info().Str("pane_id", string(paneID)).Str("uri", uri).Msg("external scheme detected, launching externally") | |
| @@ -1461,7 +1461,12 @@ func (c *ContentCoordinator) setupWebViewCallbacks(ctx context.Context, paneID e | |||||
| 1461 | // Check for external URL schemes (vscode://, vscode-insiders://, spotify://, etc.) | 1461 | // Check for external URL schemes (vscode://, vscode-insiders://, spotify://, etc.) | ||
| 1462 | // These are typically triggered by JavaScript redirects (window.location) | 1462 | // These are typically triggered by JavaScript redirects (window.location) | ||
| 1463 | isExternal := urlutil.IsExternalScheme(uri) | 1463 | isExternal := urlutil.IsExternalScheme(uri) | ||
| 1464 | - | log.Debug().Str("pane_id", string(paneID)).Str("uri", uri).Bool("is_external", isExternal).Bool("is_loading", wv.IsLoading()).Msg("OnURIChanged") | 1464 | + | log.Debug(). |
| 1465 | + | Str("pane_id", string(paneID)). | |||
| 1466 | + | Str("uri", uri). | |||
| 1467 | + | Bool("is_external", isExternal). | |||
| 1468 | + | Bool("is_loading", wv.IsLoading()). | |||
| 1469 | + | Msg("OnURIChanged") | |||
| 1465 | 1470 | ||||
| 1466 | if isExternal { | 1471 | if isExternal { | ||
| 1467 | log.Info().Str("pane_id", string(paneID)).Str("uri", uri).Msg("external scheme detected, launching externally") | 1472 | log.Info().Str("pane_id", string(paneID)).Str("uri", uri).Msg("external scheme detected, launching externally") | ||
M internal/ui/input/gesture.go +3 -3
| @@ -128,14 +128,14 @@ func (h *GestureHandler) handlePressed(nPress int) { | |||
| 128 | 128 | log.Debug().Uint("button", button).Msg("gesture: direct go back") | |
| 129 | 129 | nav.GoBackDirect() | |
| 130 | 130 | } else if handler != nil { | |
| 131 | - | handler(h.ctx, ActionGoBack) | |
| 131 | + | _ = handler(h.ctx, ActionGoBack) | |
| 132 | 132 | } | |
| 133 | 133 | case mouseButtonForward: | |
| 134 | 134 | if nav != nil { | |
| 135 | 135 | log.Debug().Uint("button", button).Msg("gesture: direct go forward") | |
| 136 | 136 | nav.GoForwardDirect() | |
| 137 | 137 | } else if handler != nil { | |
| 138 | - | handler(h.ctx, ActionGoForward) | |
| 138 | + | _ = handler(h.ctx, ActionGoForward) | |
| 139 | 139 | } | |
| 140 | 140 | default: | |
| 141 | 141 | // Not a navigation button, ignore | |
| @@ -145,7 +145,7 @@ func (h *GestureHandler) handlePressed(nPress int) { | |||
| 145 | 145 | // Claim the gesture sequence to stop event propagation. | |
| 146 | 146 | // This matches Epiphany's behavior: gtk_gesture_set_state(gesture, GTK_EVENT_SEQUENCE_CLAIMED) | |
| 147 | 147 | // Without this, GTK may continue propagating the event which can interfere with WebKit. | |
| 148 | - | h.clickGesture.Gesture.SetState(gtkEventSequenceClaimed) | |
| 148 | + | h.clickGesture.SetState(gtkEventSequenceClaimed) | |
| 149 | 149 | } | |
| 150 | 150 | ||
| 151 | 151 | // Detach removes the gesture handler. | |
| @@ -128,14 +128,14 @@ func (h *GestureHandler) handlePressed(nPress int) { | |||||
| 128 | log.Debug().Uint("button", button).Msg("gesture: direct go back") | 128 | log.Debug().Uint("button", button).Msg("gesture: direct go back") | ||
| 129 | nav.GoBackDirect() | 129 | nav.GoBackDirect() | ||
| 130 | } else if handler != nil { | 130 | } else if handler != nil { | ||
| 131 | - | handler(h.ctx, ActionGoBack) | 131 | + | _ = handler(h.ctx, ActionGoBack) |
| 132 | } | 132 | } | ||
| 133 | case mouseButtonForward: | 133 | case mouseButtonForward: | ||
| 134 | if nav != nil { | 134 | if nav != nil { | ||
| 135 | log.Debug().Uint("button", button).Msg("gesture: direct go forward") | 135 | log.Debug().Uint("button", button).Msg("gesture: direct go forward") | ||
| 136 | nav.GoForwardDirect() | 136 | nav.GoForwardDirect() | ||
| 137 | } else if handler != nil { | 137 | } else if handler != nil { | ||
| 138 | - | handler(h.ctx, ActionGoForward) | 138 | + | _ = handler(h.ctx, ActionGoForward) |
| 139 | } | 139 | } | ||
| 140 | default: | 140 | default: | ||
| 141 | // Not a navigation button, ignore | 141 | // Not a navigation button, ignore | ||
| @@ -145,7 +145,7 @@ func (h *GestureHandler) handlePressed(nPress int) { | |||||
| 145 | // Claim the gesture sequence to stop event propagation. | 145 | // Claim the gesture sequence to stop event propagation. | ||
| 146 | // This matches Epiphany's behavior: gtk_gesture_set_state(gesture, GTK_EVENT_SEQUENCE_CLAIMED) | 146 | // This matches Epiphany's behavior: gtk_gesture_set_state(gesture, GTK_EVENT_SEQUENCE_CLAIMED) | ||
| 147 | // Without this, GTK may continue propagating the event which can interfere with WebKit. | 147 | // Without this, GTK may continue propagating the event which can interfere with WebKit. | ||
| 148 | - | h.clickGesture.Gesture.SetState(gtkEventSequenceClaimed) | 148 | + | h.clickGesture.SetState(gtkEventSequenceClaimed) |
| 149 | } | 149 | } | ||
| 150 | 150 | ||||
| 151 | // Detach removes the gesture handler. | 151 | // Detach removes the gesture handler. | ||