include addresses for sanity testing
This commit is contained in:
14
cmd/main.go
14
cmd/main.go
@@ -35,9 +35,10 @@ func Run(ctx context.Context) error {
|
|||||||
origin := resp.Results[0].Geometry.Location
|
origin := resp.Results[0].Geometry.Location
|
||||||
|
|
||||||
type Result struct {
|
type Result struct {
|
||||||
Name string
|
Name string
|
||||||
Lat float64
|
Lat float64
|
||||||
Lng float64
|
Lng float64
|
||||||
|
Address string
|
||||||
}
|
}
|
||||||
results := []Result{}
|
results := []Result{}
|
||||||
var nextToken string
|
var nextToken string
|
||||||
@@ -55,9 +56,10 @@ func Run(ctx context.Context) error {
|
|||||||
nextToken = resp.NextPageToken
|
nextToken = resp.NextPageToken
|
||||||
for _, result := range resp.Results {
|
for _, result := range resp.Results {
|
||||||
results = append(results, Result{
|
results = append(results, Result{
|
||||||
Name: result.Name,
|
Name: result.Name,
|
||||||
Lat: result.Geometry.Location.Lat,
|
Lat: result.Geometry.Location.Lat,
|
||||||
Lng: result.Geometry.Location.Lng,
|
Lng: result.Geometry.Location.Lng,
|
||||||
|
Address: result.FormattedAddress,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
log.Printf("%d...", len(resp.Results))
|
log.Printf("%d...", len(resp.Results))
|
||||||
|
|||||||
Reference in New Issue
Block a user