golang delete a file if it exists code example Example: golang delete file err := os.Remove("path/to/file.format")