From 1c5fc2e4364063884f33b78f45f351201705fae4 Mon Sep 17 00:00:00 2001 From: Martin Kagamino Lehoux Date: Thu, 27 Aug 2026 11:32:31 +0200 Subject: Tame the deadcode gate and remove dead web helpers Run deadcode with -test and without the vendored node_modules package so the check reports only genuinely unreachable code instead of test-only helpers and vendored functions. Remove the three web helpers it still flagged (formatBikeType, formatRideType, dataQualityURL) that had no callers. Apply the go fix modernizations the check gate performs (range-over-int loops and embedded-field composite literals) that the gate had rewritten in the working tree. --- ride/ride.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'ride') diff --git a/ride/ride.go b/ride/ride.go index 8e8bf95..77a8e14 100644 --- a/ride/ride.go +++ b/ride/ride.go @@ -162,11 +162,9 @@ func FromColumnsWithMetrics(distances []float64, elevations []float64, coords [] func fromColumns(distances []float64, elevations []float64, coords []geodist.Coord, timestamps []time.Time, heartRates, cadences, powers []float64) Ride { ride := Ride{ - Route: climb.Route{ - Distances: distances, - Elevations: elevations, - Coords: coords, - }, + Distances: distances, + Elevations: elevations, + Coords: coords, timestamps: timestamps, heartRates: heartRates, cadences: cadences, -- cgit v1.3