In case of (b *Bot) Download(file *File, localFilename string) error function, users may need different actions than just saving the file automatically on disk, e.g.
storing the file on minio, s3, etc.
piping the file to a request to another service
piping the file to an AI model
making the file on the disk however the user wants.
Having another DownloadToWriter method that accepts any kind of io.Writer will help users skip an extra step to save on disk and read from the disk.
In case of
(b *Bot) Download(file *File, localFilename string) error
function, users may need different actions than just saving the file automatically on disk, e.g.Having another DownloadToWriter method that accepts any kind of
io.Writer
will help users skip an extra step to save on disk and read from the disk.