summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Burwell <ben@benburwell.com>2020-02-05 23:41:26 -0500
committerBen Burwell <ben@benburwell.com>2020-02-05 23:41:26 -0500
commitd0b64a399327399a2724ca34492eeb922394b0d5 (patch)
tree472153b716c0300e4031abbd9ade2e64a18bf3ef
parenteb17b7e124a0449788afa242dec5933b1bf5b4ee (diff)
fix FormatFloat arg orderv0.1.0
-rw-r--r--metar/metar.go12
1 files 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))
}
}