Close closes the response body (hence, response) and the async buffer itself
()
| 90 | |
| 91 | // Close closes the response body (hence, response) and the async buffer itself |
| 92 | func (d *imageDataAsyncBuffer) Close() error { |
| 93 | d.cancelOnce.Do(func() { |
| 94 | d.b.Close() |
| 95 | for _, cancel := range d.cancel { |
| 96 | cancel() |
| 97 | } |
| 98 | }) |
| 99 | |
| 100 | return nil |
| 101 | } |
| 102 | |
| 103 | // Format returns the image format from the metadata |
| 104 | func (d *imageDataAsyncBuffer) Format() imagetype.Type { |