Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
defer func() {
fileErr := os.Remove(outputLocation)
if fileErr == nil {
log.Println("Deleted temp file", outputLocation)
} else {
log.Println("Error removing output file", fileErr.Error())
}
}()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment