Skip to content

Instantly share code, notes, and snippets.

@abhirockzz
Created March 26, 2019 05:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abhirockzz/cdf112e81d7fae24c9ccea6a2341451f to your computer and use it in GitHub Desktop.
Save abhirockzz/cdf112e81d7fae24c9ccea6a2341451f to your computer and use it in GitHub Desktop.
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