fetchImage downloads the source image asynchronously
( do imagedata.DownloadOptions, )
| 67 | |
| 68 | // fetchImage downloads the source image asynchronously |
| 69 | func (r *request) fetchImage( |
| 70 | do imagedata.DownloadOptions, |
| 71 | ) (imagedata.ImageData, http.Header, errctx.Error) { |
| 72 | data, h, err := r.ImageDataFactory().DownloadAsync( |
| 73 | r.req.Context(), |
| 74 | r.imageURL, |
| 75 | "source image", |
| 76 | do, |
| 77 | ) |
| 78 | return data, h, r.wrapDownloadingErr(err) |
| 79 | } |
| 80 | |
| 81 | // handleDownloadError replaces the image data with fallback image if needed |
| 82 | func (r *request) handleDownloadError( |
no test coverage detected