No need to defer closing of file.
This commit is contained in:
parent
86847b7c3c
commit
9e0140b3e1
1 changed files with 0 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue