I don't think you need to close the file if the open failed...it was never open I suspect
One more case where I don't think you need to close things
You missed an error check
Simplifies the code a bit
Ignore the mocleaner command generated if someone does 'go build'