From 94aa1d0af0fa4d6c7873a4b5de0f55dfcc0aa03c Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Wed, 13 May 2026 10:32:48 +0300 Subject: enforce gofmt formatting and add Fmt/FmtCheck mage targets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Run gofmt -w on 9 files that had minor alignment/whitespace drift (pair.go, filter.go, ior_mode_registry.go, ior_mode_test.go, runtime.go, engine.go, dashboard/model.go, flamegraph/model.go, flamegraph/renderer.go). Add two new Mage targets to Magefile.go: - `mage fmt` – rewrites all .go files in-place via go/format - `mage fmtCheck` – dry-run check; fails with a list of offending files, suitable as a CI gate Co-Authored-By: Claude Sonnet 4.6 --- internal/tui/flamegraph/model.go | 2 -- internal/tui/flamegraph/renderer.go | 8 ++++---- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'internal/tui/flamegraph') diff --git a/internal/tui/flamegraph/model.go b/internal/tui/flamegraph/model.go index 73285f9..c188323 100644 --- a/internal/tui/flamegraph/model.go +++ b/internal/tui/flamegraph/model.go @@ -1051,7 +1051,6 @@ func (m Model) rootSnapshotPath() string { return m.ZoomNavigator.rootSnapshotPath(m.snapshot, m.frames) } - // frameIndexAt delegates to the FrameAnimator package-level helper to convert // terminal coordinates (x, y) to a frame index, accounting for UI chrome. func (m Model) frameIndexAt(x, y int) int { @@ -1063,7 +1062,6 @@ func (m Model) frameCoordToTargetRow(dataRow, availableRows int) int { return frameCoordToTargetRow(m.frames, dataRow, availableRows) } - func (m Model) withZoomLineage(frames []tuiFrame) []tuiFrame { return applyZoomLineage(frames, m.snapshot, m.zoomPath, m.width) } diff --git a/internal/tui/flamegraph/renderer.go b/internal/tui/flamegraph/renderer.go index 8f0d09b..24b99ed 100644 --- a/internal/tui/flamegraph/renderer.go +++ b/internal/tui/flamegraph/renderer.go @@ -209,12 +209,12 @@ func semanticFrameColor(name string) (color.Color, bool) { // renderViewParams bundles the pre-computed layout parameters used by // RenderTerminalView helpers to avoid threading many individual arguments. type renderViewParams struct { - rowOffset int - maxRow int - barHeight int + rowOffset int + maxRow int + barHeight int availableRows int visibleFrames int - truncated bool + truncated bool } // computeRenderParams derives the row-layout parameters for a given frame set -- cgit v1.2.3