func parsePlaceType(placeType string, r *maps.RadarSearchRequest) { if placeType != "" { t, err := maps.ParsePlaceType(placeType) check(err) r.Type = t } }
func parsePlaceType(placeType string, r *maps.PlaceAutocompleteRequest) { if placeType != "" { t, err := maps.ParsePlaceType(placeType) check(err) r.Type = t } }
func parsePlaceType(placeType string, r *maps.TextSearchRequest) { if placeType != "" { t, err := maps.ParsePlaceType(placeType) if err != nil { usageAndExit(fmt.Sprintf("Unknown place type \"%v\"", placeType)) } r.Type = t } }