Skip to content

Commit

Permalink
pptx_test: check returned error before deferring f.Close()
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathaningram committed Apr 9, 2021
1 parent 3800ce7 commit 6897b7b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pptx_test/pptx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ import (

func TestConvertPptx(t *testing.T) {
f, err := os.Open("./testdata/sample.pptx")
if err != nil {
t.Fatal(err)
}
defer f.Close()

if err != nil {
Expand Down

0 comments on commit 6897b7b

Please sign in to comment.