can you build some utility function check_r, which will panic if found error code, so your Go code will look like:
latlong := check_r(getLatLong(city))