Skip to content

Commit

Permalink
simplified structures
Browse files Browse the repository at this point in the history
  • Loading branch information
matryer committed Jul 20, 2016
1 parent b1415a5 commit edfa7ea
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions chapter7/meander/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ var APIKey string
// Place represents a single place.
type Place struct {
*googleGeometry `json:"geometry"`
Name string `json:"name"`
Icon string `json:"icon"`
Photos []*googlePhoto `json:"photos"`
Vicinity string `json:"vicinity"`
Name string `json:"name"`
Icon string `json:"icon"`
Photos []googlePhoto `json:"photos"`
Vicinity string `json:"vicinity"`
}

// Public gets a public view of a Place.
Expand Down Expand Up @@ -106,10 +106,10 @@ func (q *Query) Run() []interface{} {
}

type googleResponse struct {
Results []*Place `json:"results"`
Results []Place `json:"results"`
}
type googleGeometry struct {
*googleLocation `json:"location"`
googleLocation `json:"location"`
}
type googleLocation struct {
Lat float64 `json:"lat"`
Expand Down

0 comments on commit edfa7ea

Please sign in to comment.