From d25c2cba801cbaa9f9c0d5a92b90f153630ffe24 Mon Sep 17 00:00:00 2001 From: Martin Kagamino Lehoux Date: Fri, 21 Aug 2026 15:52:02 +0200 Subject: Upgrade to Go 1.27 and apply go fix modernization --- geo/geo.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'geo/geo.go') diff --git a/geo/geo.go b/geo/geo.go index 0fcff14..50ac4c7 100644 --- a/geo/geo.go +++ b/geo/geo.go @@ -14,7 +14,7 @@ func DistanceM(a, b geodist.Coord) float64 { func Nearest(coords []geodist.Coord, target geodist.Coord) (int, float64) { bestIndex := 0 bestDistance := math.Inf(1) - for index := 0; index < len(coords); index++ { + for index := range coords { distance := DistanceM(coords[index], target) if distance < bestDistance { bestIndex = index -- cgit v1.3