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 5f2e3d4 commit cfb9ffd
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 @@ -119,7 +119,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, error) {
res := &googleGeocodeResponse{}
err := json.Unmarshal(data, &res)
err := json.Unmarshal(data, res)

if err != nil {
return "", err
Expand Down
2 changes: 1 addition & 1 deletion opencage_geocoder.go
Expand Up @@ -84,7 +84,7 @@ func (g *OpenCageGeocoder) Geocode(query string) (*Point, error) {
// Extracts the first location from a OpenCage response body.
func (g *OpenCageGeocoder) extractLatLngFromResponse(data []byte) (Point, error) {
res := &opencageGeocodeResponse{}
json.Unmarshal(data, &res)
json.Unmarshal(data, res)

// fmt.Printf("%s\n", data)
// fmt.Printf("%v\n", res)
Expand Down

0 comments on commit cfb9ffd

Please sign in to comment.