From d0b64a399327399a2724ca34492eeb922394b0d5 Mon Sep 17 00:00:00 2001 From: Ben Burwell Date: Wed, 5 Feb 2020 23:41:26 -0500 Subject: fix FormatFloat arg order --- metar/metar.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/metar/metar.go b/metar/metar.go index ef7a187..8af5d52 100644 --- a/metar/metar.go +++ b/metar/metar.go @@ -239,7 +239,7 @@ func TimeRange(from, to time.Time) func(*Request) { // HoursBeforeNow requests METARs observed during the previous h hours. func HoursBeforeNow(h float64) func(*Request) { return func(r *Request) { - r.v.Add("hoursBeforeNow", strconv.FormatFloat(h, 'f', 64, -1)) + r.v.Add("hoursBeforeNow", strconv.FormatFloat(h, 'f', -1, 64)) } } @@ -270,10 +270,10 @@ func MostRecentForEachStation(s string) func(*Request) { // Does not support bounding boxes that encompass a pole. func LonLatRect(minLat, minLon, maxLat, maxLon float64) func(*Request) { return func(r *Request) { - r.v.Add("minLat", strconv.FormatFloat(minLat, 'f', 64, -1)) - r.v.Add("minLon", strconv.FormatFloat(minLon, 'f', 64, -1)) - r.v.Add("maxLat", strconv.FormatFloat(maxLat, 'f', 64, -1)) - r.v.Add("maxLon", strconv.FormatFloat(maxLon, 'f', 64, -1)) + r.v.Add("minLat", strconv.FormatFloat(minLat, 'f', -1, 64)) + r.v.Add("minLon", strconv.FormatFloat(minLon, 'f', -1, 64)) + r.v.Add("maxLat", strconv.FormatFloat(maxLat, 'f', -1, 64)) + r.v.Add("maxLon", strconv.FormatFloat(maxLon, 'f', -1, 64)) } } @@ -310,7 +310,7 @@ func FlightPath(maxDist float64, waypoints ...string) func(*Request) { // are filtered and the most recent of duplicate stations is reported. func MinDegreeDistance(d float64) func(*Request) { return func(r *Request) { - r.v.Add("minDegreeDistance", strconv.FormatFloat(d, 'f', 64, -1)) + r.v.Add("minDegreeDistance", strconv.FormatFloat(d, 'f', -1, 64)) } } -- cgit v1.2.3