func parsePlaceType(placeType string, r *maps.PlaceAutocompleteRequest) { if placeType != "" { t, err := maps.ParsePlaceType(placeType) check(err) r.Type = t } }
func parseLocation(location string, r *maps.PlaceAutocompleteRequest) { if location != "" { l, err := maps.ParseLatLng(location) check(err) r.Location = &l } }