func (b *Building) getGeoloc() { qry := new(gominatim.SearchQuery) qry.Q = b.Number + ", " + b.Street + ", " + b.City + ", " + b.Zip res, err := qry.Get() if err == nil { b.Lat = res[0].Lat b.Lat_f, _ = strconv.ParseFloat(b.Lat, 64) b.Lon = res[0].Lon b.Lon_f, _ = strconv.ParseFloat(b.Lon, 64) } }