From 4866aad728de84df3e1dfc1f39e95854662754da Mon Sep 17 00:00:00 2001 From: kellydunn Date: Mon, 4 May 2015 22:30:10 -0700 Subject: [PATCH] Removing unecessary dereferences --- google_geocoder.go | 2 +- opencage_geocoder.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google_geocoder.go b/google_geocoder.go index e102a83..121b32a 100644 --- a/google_geocoder.go +++ b/google_geocoder.go @@ -115,7 +115,7 @@ func (g *GoogleGeocoder) ReverseGeocode(p *Point) (string, error) { // Returns an Address from a Google Geocoder Response body. func (g *GoogleGeocoder) extractAddressFromResponse(data []byte) string { res := &googleGeocodeResponse{} - json.Unmarshal(data, &res) + json.Unmarshal(data, res) return res.Results[0].FormattedAddress } diff --git a/opencage_geocoder.go b/opencage_geocoder.go index 9cb8f31..0bb7332 100644 --- a/opencage_geocoder.go +++ b/opencage_geocoder.go @@ -117,7 +117,7 @@ func (g *OpenCageGeocoder) ReverseGeocode(p *Point) (string, error) { // Return sthe first address in the passed in byte array. func (g *OpenCageGeocoder) extractAddressFromResponse(data []byte) string { res := &opencageGeocodeResponse{} - json.Unmarshal(data, &res) + json.Unmarshal(data, res) resStr := res.Results[0].Formatted return resStr