diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2026-08-27 11:32:31 +0200 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2026-08-27 11:32:31 +0200 |
| commit | 1c5fc2e4364063884f33b78f45f351201705fae4 (patch) | |
| tree | d0f76e824a9910771946d4f4c21905309f4f4788 /web/categories.go | |
| parent | 825cf388b55a6c8441e02149749bb6e2968477c0 (diff) | |
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.
Diffstat (limited to 'web/categories.go')
| -rw-r--r-- | web/categories.go | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/web/categories.go b/web/categories.go index 4077092..a76fa1c 100644 --- a/web/categories.go +++ b/web/categories.go @@ -67,20 +67,6 @@ var rideTypeLabels = map[ride.RideType]string{ ride.RideTypeTransport: "Transport", } -func formatBikeType(value ride.BikeType) string { - if label, ok := bikeTypeLabels[value]; ok { - return label - } - return string(value) -} - -func formatRideType(value ride.RideType) string { - if label, ok := rideTypeLabels[value]; ok { - return label - } - return string(value) -} - func formatCategoryOrEmpty(value string) string { if value == "" { return "—" |
