No need to defer closing of file.

This commit is contained in:
Blallo 2019-05-16 21:01:13 +02:00
parent 86847b7c3c
commit 9e0140b3e1
No known key found for this signature in database
GPG key ID: 0CBE577C9B72DC3F

View file

@ -103,7 +103,6 @@ func IdentifyType(path string) (int, int64, error) {
func ls(path string) ([]string, error) {
var content []string
f, err := os.Open(path)
defer f.Close()
if err != nil {
return []string{}, err
}