style: apply gofmt to struct field alignment
- commit
- 2c3af17010887939033fbf8db89a24ce20bfaeda
- author
- brice · · 2026-10-14 09:30 UTC
- parent
- 1983990
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
5 files · +25 -25
M internal/application/usecase/favicon_refresh.go +2 -2
| @@ -136,8 +136,8 @@ type refreshCoordinator struct { | |||
| 136 | 136 | // Adds happen under mu before the goroutine starts; Done runs when the | |
| 137 | 137 | // executor finishes. Sealed admission (closed) guarantees no Add can | |
| 138 | 138 | // race a completed Wait. | |
| 139 | - | wg sync.WaitGroup | |
| 140 | - | epoch uint64 | |
| 139 | + | wg sync.WaitGroup | |
| 140 | + | epoch uint64 | |
| 141 | 141 | // closed seals admission: set by Close before cancel/drain, so no | |
| 142 | 142 | // refresh can start after the drain observes zero active operations. | |
| 143 | 143 | closed bool | |
| @@ -136,8 +136,8 @@ type refreshCoordinator struct { | |||||
| 136 | // Adds happen under mu before the goroutine starts; Done runs when the | 136 | // Adds happen under mu before the goroutine starts; Done runs when the | ||
| 137 | // executor finishes. Sealed admission (closed) guarantees no Add can | 137 | // executor finishes. Sealed admission (closed) guarantees no Add can | ||
| 138 | // race a completed Wait. | 138 | // race a completed Wait. | ||
| 139 | - | wg sync.WaitGroup | 139 | + | wg sync.WaitGroup |
| 140 | - | epoch uint64 | 140 | + | epoch uint64 |
| 141 | // closed seals admission: set by Close before cancel/drain, so no | 141 | // closed seals admission: set by Close before cancel/drain, so no | ||
| 142 | // refresh can start after the drain observes zero active operations. | 142 | // refresh can start after the drain observes zero active operations. | ||
| 143 | closed bool | 143 | closed bool | ||
M internal/infrastructure/cef/systemview_asset_cache.go +9 -9
| @@ -192,22 +192,22 @@ func readBoundedAsset(assetsFS fs.FS, name string, maxBytes int) ([]byte, error) | |||
| 192 | 192 | // waiters share the same decoded bytes unaffected. A versioned request pins | |
| 193 | 193 | // exact bytes: only output hashing to wantDigest earns immutable headers. | |
| 194 | 194 | type systemviewWASMResourceHandler struct { | |
| 195 | - | cancel context.CancelFunc | |
| 196 | - | cancelOnce sync.Once | |
| 195 | + | cancel context.CancelFunc | |
| 196 | + | cancelOnce sync.Once | |
| 197 | 197 | // ctx scopes the request to the handler lifetime: engine shutdown | |
| 198 | 198 | // cancels it, letting completion suppress the native continuation. | |
| 199 | 199 | // It is released after the continuation decision, never by load | |
| 200 | 200 | // itself, so shutdown stays observable at that point. | |
| 201 | - | ctx context.Context | |
| 202 | - | bundle *systemviewAssetBundle | |
| 203 | - | versioned bool | |
| 204 | - | wantDigest string | |
| 205 | - | once sync.Once | |
| 201 | + | ctx context.Context | |
| 202 | + | bundle *systemviewAssetBundle | |
| 203 | + | versioned bool | |
| 204 | + | wantDigest string | |
| 205 | + | once sync.Once | |
| 206 | 206 | // settleMu arbitrates the continuation race: exactly one of | |
| 207 | 207 | // request completion or cancellation wins, so a canceled waiter | |
| 208 | 208 | // never resumes CEF while a completed load always does. | |
| 209 | - | settleMu sync.Mutex | |
| 210 | - | settled bool | |
| 209 | + | settleMu sync.Mutex | |
| 210 | + | settled bool | |
| 211 | 211 | done chan struct{} | |
| 212 | 212 | data []byte | |
| 213 | 213 | contentType string | |
| @@ -192,22 +192,22 @@ func readBoundedAsset(assetsFS fs.FS, name string, maxBytes int) ([]byte, error) | |||||
| 192 | // waiters share the same decoded bytes unaffected. A versioned request pins | 192 | // waiters share the same decoded bytes unaffected. A versioned request pins | ||
| 193 | // exact bytes: only output hashing to wantDigest earns immutable headers. | 193 | // exact bytes: only output hashing to wantDigest earns immutable headers. | ||
| 194 | type systemviewWASMResourceHandler struct { | 194 | type systemviewWASMResourceHandler struct { | ||
| 195 | - | cancel context.CancelFunc | 195 | + | cancel context.CancelFunc |
| 196 | - | cancelOnce sync.Once | 196 | + | cancelOnce sync.Once |
| 197 | // ctx scopes the request to the handler lifetime: engine shutdown | 197 | // ctx scopes the request to the handler lifetime: engine shutdown | ||
| 198 | // cancels it, letting completion suppress the native continuation. | 198 | // cancels it, letting completion suppress the native continuation. | ||
| 199 | // It is released after the continuation decision, never by load | 199 | // It is released after the continuation decision, never by load | ||
| 200 | // itself, so shutdown stays observable at that point. | 200 | // itself, so shutdown stays observable at that point. | ||
| 201 | - | ctx context.Context | 201 | + | ctx context.Context |
| 202 | - | bundle *systemviewAssetBundle | 202 | + | bundle *systemviewAssetBundle |
| 203 | - | versioned bool | 203 | + | versioned bool |
| 204 | - | wantDigest string | 204 | + | wantDigest string |
| 205 | - | once sync.Once | 205 | + | once sync.Once |
| 206 | // settleMu arbitrates the continuation race: exactly one of | 206 | // settleMu arbitrates the continuation race: exactly one of | ||
| 207 | // request completion or cancellation wins, so a canceled waiter | 207 | // request completion or cancellation wins, so a canceled waiter | ||
| 208 | // never resumes CEF while a completed load always does. | 208 | // never resumes CEF while a completed load always does. | ||
| 209 | - | settleMu sync.Mutex | 209 | + | settleMu sync.Mutex |
| 210 | - | settled bool | 210 | + | settled bool |
| 211 | done chan struct{} | 211 | done chan struct{} | ||
| 212 | data []byte | 212 | data []byte | ||
| 213 | contentType string | 213 | contentType string | ||
M internal/infrastructure/cef/webview_scroll_cancel_test.go +11 -11
| @@ -120,13 +120,13 @@ func TestNavCommandOffThreadDispatchCompletes(t *testing.T) { | |||
| 120 | 120 | browser.EXPECT().GoBack().Return().Once() | |
| 121 | 121 | ||
| 122 | 122 | wv := &WebView{ | |
| 123 | - | ctx: context.Background(), | |
| 124 | - | engine: &Engine{}, | |
| 125 | - | browser: browser, | |
| 123 | + | ctx: context.Background(), | |
| 124 | + | engine: &Engine{}, | |
| 125 | + | browser: browser, | |
| 126 | 126 | scrollCancelSeam: fake, | |
| 127 | - | gtkSyncIsOwner: func() bool { return false }, | |
| 128 | - | gtkSyncDispatch: func(fn func()) { go fn() }, | |
| 129 | - | gtkSyncTimeout: 2 * time.Second, | |
| 127 | + | gtkSyncIsOwner: func() bool { return false }, | |
| 128 | + | gtkSyncDispatch: func(fn func()) { go fn() }, | |
| 129 | + | gtkSyncTimeout: 2 * time.Second, | |
| 130 | 130 | } | |
| 131 | 131 | ||
| 132 | 132 | require.NoError(t, wv.GoBack(context.Background())) | |
| @@ -141,12 +141,12 @@ func TestNavCommandDispatchTimeoutSkipsNavigation(t *testing.T) { | |||
| 141 | 141 | fake.startGesture() | |
| 142 | 142 | ||
| 143 | 143 | wv := &WebView{ | |
| 144 | - | ctx: context.Background(), | |
| 145 | - | engine: &Engine{}, | |
| 144 | + | ctx: context.Background(), | |
| 145 | + | engine: &Engine{}, | |
| 146 | 146 | scrollCancelSeam: fake, | |
| 147 | - | gtkSyncIsOwner: func() bool { return false }, | |
| 148 | - | gtkSyncDispatch: func(func()) {}, | |
| 149 | - | gtkSyncTimeout: 20 * time.Millisecond, | |
| 147 | + | gtkSyncIsOwner: func() bool { return false }, | |
| 148 | + | gtkSyncDispatch: func(func()) {}, | |
| 149 | + | gtkSyncTimeout: 20 * time.Millisecond, | |
| 150 | 150 | } | |
| 151 | 151 | ||
| 152 | 152 | err := wv.LoadURI(context.Background(), "https://example.com/") | |
| @@ -120,13 +120,13 @@ func TestNavCommandOffThreadDispatchCompletes(t *testing.T) { | |||||
| 120 | browser.EXPECT().GoBack().Return().Once() | 120 | browser.EXPECT().GoBack().Return().Once() | ||
| 121 | 121 | ||||
| 122 | wv := &WebView{ | 122 | wv := &WebView{ | ||
| 123 | - | ctx: context.Background(), | 123 | + | ctx: context.Background(), |
| 124 | - | engine: &Engine{}, | 124 | + | engine: &Engine{}, |
| 125 | - | browser: browser, | 125 | + | browser: browser, |
| 126 | scrollCancelSeam: fake, | 126 | scrollCancelSeam: fake, | ||
| 127 | - | gtkSyncIsOwner: func() bool { return false }, | 127 | + | gtkSyncIsOwner: func() bool { return false }, |
| 128 | - | gtkSyncDispatch: func(fn func()) { go fn() }, | 128 | + | gtkSyncDispatch: func(fn func()) { go fn() }, |
| 129 | - | gtkSyncTimeout: 2 * time.Second, | 129 | + | gtkSyncTimeout: 2 * time.Second, |
| 130 | } | 130 | } | ||
| 131 | 131 | ||||
| 132 | require.NoError(t, wv.GoBack(context.Background())) | 132 | require.NoError(t, wv.GoBack(context.Background())) | ||
| @@ -141,12 +141,12 @@ func TestNavCommandDispatchTimeoutSkipsNavigation(t *testing.T) { | |||||
| 141 | fake.startGesture() | 141 | fake.startGesture() | ||
| 142 | 142 | ||||
| 143 | wv := &WebView{ | 143 | wv := &WebView{ | ||
| 144 | - | ctx: context.Background(), | 144 | + | ctx: context.Background(), |
| 145 | - | engine: &Engine{}, | 145 | + | engine: &Engine{}, |
| 146 | scrollCancelSeam: fake, | 146 | scrollCancelSeam: fake, | ||
| 147 | - | gtkSyncIsOwner: func() bool { return false }, | 147 | + | gtkSyncIsOwner: func() bool { return false }, |
| 148 | - | gtkSyncDispatch: func(func()) {}, | 148 | + | gtkSyncDispatch: func(func()) {}, |
| 149 | - | gtkSyncTimeout: 20 * time.Millisecond, | 149 | + | gtkSyncTimeout: 20 * time.Millisecond, |
| 150 | } | 150 | } | ||
| 151 | 151 | ||||
| 152 | err := wv.LoadURI(context.Background(), "https://example.com/") | 152 | err := wv.LoadURI(context.Background(), "https://example.com/") | ||
M internal/infrastructure/config/engine.go +2 -2
| @@ -130,8 +130,8 @@ type CEFInputConfig struct { | |||
| 130 | 130 | ScrollHorizontalMultiplier float64 `mapstructure:"scroll_horizontal_multiplier" toml:"scroll_horizontal_multiplier" yaml:"scroll_horizontal_multiplier"` //nolint:lll // struct tags exceed lll limit | |
| 131 | 131 | ScrollVerticalMultiplier float64 `mapstructure:"scroll_vertical_multiplier" toml:"scroll_vertical_multiplier" yaml:"scroll_vertical_multiplier"` //nolint:lll // struct tags exceed lll limit | |
| 132 | 132 | ScrollMaxDelta int32 `mapstructure:"scroll_max_delta" toml:"scroll_max_delta" yaml:"scroll_max_delta"` //nolint:lll // struct tags exceed lll limit | |
| 133 | - | ScrollTouchpadInertia bool `mapstructure:"scroll_touchpad_inertia" toml:"scroll_touchpad_inertia" yaml:"scroll_touchpad_inertia"` //nolint:lll // struct tags exceed lll limit | |
| 134 | - | ScrollWheelSmoothing bool `mapstructure:"scroll_wheel_smoothing" toml:"scroll_wheel_smoothing" yaml:"scroll_wheel_smoothing"` //nolint:lll // struct tags exceed lll limit | |
| 133 | + | ScrollTouchpadInertia bool `mapstructure:"scroll_touchpad_inertia" toml:"scroll_touchpad_inertia" yaml:"scroll_touchpad_inertia"` //nolint:lll // struct tags exceed lll limit | |
| 134 | + | ScrollWheelSmoothing bool `mapstructure:"scroll_wheel_smoothing" toml:"scroll_wheel_smoothing" yaml:"scroll_wheel_smoothing"` //nolint:lll // struct tags exceed lll limit | |
| 135 | 135 | TouchpadNavigationEnabled bool `mapstructure:"touchpad_navigation_enabled" toml:"touchpad_navigation_enabled" yaml:"touchpad_navigation_enabled"` //nolint:lll // struct tags exceed lll limit | |
| 136 | 136 | TouchpadNavigationMinDelta float64 `mapstructure:"touchpad_navigation_min_delta" toml:"touchpad_navigation_min_delta" yaml:"touchpad_navigation_min_delta"` //nolint:lll // struct tags exceed lll limit | |
| 137 | 137 | TouchpadNavigationMaxVerticalRatio float64 `mapstructure:"touchpad_navigation_max_vertical_ratio" toml:"touchpad_navigation_max_vertical_ratio" yaml:"touchpad_navigation_max_vertical_ratio"` //nolint:lll // struct tags exceed lll limit | |
| @@ -130,8 +130,8 @@ type CEFInputConfig struct { | |||||
| 130 | ScrollHorizontalMultiplier float64 `mapstructure:"scroll_horizontal_multiplier" toml:"scroll_horizontal_multiplier" yaml:"scroll_horizontal_multiplier"` //nolint:lll // struct tags exceed lll limit | 130 | ScrollHorizontalMultiplier float64 `mapstructure:"scroll_horizontal_multiplier" toml:"scroll_horizontal_multiplier" yaml:"scroll_horizontal_multiplier"` //nolint:lll // struct tags exceed lll limit | ||
| 131 | ScrollVerticalMultiplier float64 `mapstructure:"scroll_vertical_multiplier" toml:"scroll_vertical_multiplier" yaml:"scroll_vertical_multiplier"` //nolint:lll // struct tags exceed lll limit | 131 | ScrollVerticalMultiplier float64 `mapstructure:"scroll_vertical_multiplier" toml:"scroll_vertical_multiplier" yaml:"scroll_vertical_multiplier"` //nolint:lll // struct tags exceed lll limit | ||
| 132 | ScrollMaxDelta int32 `mapstructure:"scroll_max_delta" toml:"scroll_max_delta" yaml:"scroll_max_delta"` //nolint:lll // struct tags exceed lll limit | 132 | ScrollMaxDelta int32 `mapstructure:"scroll_max_delta" toml:"scroll_max_delta" yaml:"scroll_max_delta"` //nolint:lll // struct tags exceed lll limit | ||
| 133 | - | ScrollTouchpadInertia bool `mapstructure:"scroll_touchpad_inertia" toml:"scroll_touchpad_inertia" yaml:"scroll_touchpad_inertia"` //nolint:lll // struct tags exceed lll limit | 133 | + | ScrollTouchpadInertia bool `mapstructure:"scroll_touchpad_inertia" toml:"scroll_touchpad_inertia" yaml:"scroll_touchpad_inertia"` //nolint:lll // struct tags exceed lll limit |
| 134 | - | ScrollWheelSmoothing bool `mapstructure:"scroll_wheel_smoothing" toml:"scroll_wheel_smoothing" yaml:"scroll_wheel_smoothing"` //nolint:lll // struct tags exceed lll limit | 134 | + | ScrollWheelSmoothing bool `mapstructure:"scroll_wheel_smoothing" toml:"scroll_wheel_smoothing" yaml:"scroll_wheel_smoothing"` //nolint:lll // struct tags exceed lll limit |
| 135 | TouchpadNavigationEnabled bool `mapstructure:"touchpad_navigation_enabled" toml:"touchpad_navigation_enabled" yaml:"touchpad_navigation_enabled"` //nolint:lll // struct tags exceed lll limit | 135 | TouchpadNavigationEnabled bool `mapstructure:"touchpad_navigation_enabled" toml:"touchpad_navigation_enabled" yaml:"touchpad_navigation_enabled"` //nolint:lll // struct tags exceed lll limit | ||
| 136 | TouchpadNavigationMinDelta float64 `mapstructure:"touchpad_navigation_min_delta" toml:"touchpad_navigation_min_delta" yaml:"touchpad_navigation_min_delta"` //nolint:lll // struct tags exceed lll limit | 136 | TouchpadNavigationMinDelta float64 `mapstructure:"touchpad_navigation_min_delta" toml:"touchpad_navigation_min_delta" yaml:"touchpad_navigation_min_delta"` //nolint:lll // struct tags exceed lll limit | ||
| 137 | TouchpadNavigationMaxVerticalRatio float64 `mapstructure:"touchpad_navigation_max_vertical_ratio" toml:"touchpad_navigation_max_vertical_ratio" yaml:"touchpad_navigation_max_vertical_ratio"` //nolint:lll // struct tags exceed lll limit | 137 | TouchpadNavigationMaxVerticalRatio float64 `mapstructure:"touchpad_navigation_max_vertical_ratio" toml:"touchpad_navigation_max_vertical_ratio" yaml:"touchpad_navigation_max_vertical_ratio"` //nolint:lll // struct tags exceed lll limit | ||
M internal/infrastructure/process/runtime_safety_test.go +1 -1
| @@ -38,7 +38,7 @@ func TestMergeRuntimeSafety(t *testing.T) { | |||
| 38 | 38 | for _, entry := range got { | |
| 39 | 39 | if strings.HasPrefix(entry, "GODEBUG=") { | |
| 40 | 40 | count++ | |
| 41 | - | } | |
| 41 | + | } | |
| 42 | 42 | } | |
| 43 | 43 | require.Equal(t, 1, count, "changed environ must hold exactly one GODEBUG entry") | |
| 44 | 44 | } | |
| @@ -38,7 +38,7 @@ func TestMergeRuntimeSafety(t *testing.T) { | |||||
| 38 | for _, entry := range got { | 38 | for _, entry := range got { | ||
| 39 | if strings.HasPrefix(entry, "GODEBUG=") { | 39 | if strings.HasPrefix(entry, "GODEBUG=") { | ||
| 40 | count++ | 40 | count++ | ||
| 41 | - | } | 41 | + | } |
| 42 | } | 42 | } | ||
| 43 | require.Equal(t, 1, count, "changed environ must hold exactly one GODEBUG entry") | 43 | require.Equal(t, 1, count, "changed environ must hold exactly one GODEBUG entry") | ||
| 44 | } | 44 | } | ||