Follow-up from "Add method to register function to call when download is complete"
The following discussion from !3319 (merged) should be addressed:
-
@DavidVorick started a discussion: (+2 comments) I'm still confused about this block of code. On new line 392, we check if the dw is a Closer, and if it is we immediately return with
closer.Close()
. But then right after, it seems that if it's an os.File (which is also a closer), we close the file in anOnComplete
- doesn't that mean this code doesn't ever get reached?Was the intention to do an
OnComplete
with all closers instead of closing immediately?