cmd/revid-cli: input file is closed before we can read it
Issue #50
resolved
if we do file output, we are getting an error indicating that the file has been closed when we're trying to read from it. This is because in setupInputForFile we do a defer on f.Close() but before the return we run lexTo as a routine which requires the file.
I propose that we have revid possess a File type and close in revid.Stop().
Comments (2)
-
-
reporter - changed status to resolved
Resolved in PR #194
- Log in to comment
I don't think a file type is needed. There are two options, having an interface input that's the cognate of the
loadSender
s or have the startup routines return a closure,func() error
, that handles resource freeing (in this case closing the file).