Skip to content

Commit

Permalink
Removing unecessary dereferences
Browse files Browse the repository at this point in the history
  • Loading branch information
kellydunn committed May 5, 2015
1 parent 33e3592 commit 4866aad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion google_geocoder.go
Expand Up @@ -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
}
2 changes: 1 addition & 1 deletion opencage_geocoder.go
Expand Up @@ -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
Expand Down

0 comments on commit 4866aad

Please sign in to comment.