Skip to content

Commit

Permalink
Add defer file close.
Browse files Browse the repository at this point in the history
  • Loading branch information
matsuuram committed Aug 10, 2016
1 parent d71a997 commit 2221d41
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ func parseTsFile(filename string, options options.Options) error {
if err != nil {
return fmt.Errorf("File open error: %s %s", filename, err)
}
defer file.Close()
fmt.Println("Input file: ", filename)

pat := tsparser.NewPat()
Expand Down

0 comments on commit 2221d41

Please sign in to comment.