Skip to content

Commit

Permalink
fix: close file
Browse files Browse the repository at this point in the history
  • Loading branch information
testwill authored and bradfitz committed Apr 23, 2024
1 parent 4ba1123 commit bb15e6e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cmd/pk/mime.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ func showMIME(file string) {
if err != nil {
log.Fatal(err)
}
defer f.Close()
mime, _ := magic.MIMETypeFromReader(f)
fmt.Println(mime)
}

0 comments on commit bb15e6e

Please sign in to comment.