func (st *GetReportsByAddress) Run() (string, error) { rpts, _ := data.FindAddress(st.Address, st.radius, st.maxResults, st.includeComments) log.Debug(">>> rpts:\n%s\n", spew.Sdump(rpts)) resp, _ := response.NewResponseReports(true, st.Start(), rpts) return resp, nil }
func TestFindAddress(t *testing.T) { fmt.Println("\n\n>>>>>>>>>>>>>>>>>>> TestFindAddress <<<<<<<<<<<<<<<<<<<<<<<<<<") // addr := "200 E. Santa Clara St, San Jose, CA" addr := "73 N 6th St., San Jose, CA" radius := 500.0 limit := int64(2) rpts, err := data.FindAddress(addr, radius, limit) if err != nil { t.Errorf("FindAddress failed - error: %q", err) } fmt.Printf("Reports found for address %q, radius: %v:\n%s", addr, radius, spew.Sdump(rpts)) }