add missing File.Close() calls
This commit is contained in:
parent
06f296639e
commit
58b6b1618d
2 changed files with 3 additions and 0 deletions
|
|
@ -26,6 +26,7 @@ func Dirents(dir string) (entries []string, err error) {
|
|||
if err != nil {
|
||||
return nil, errors.New(err.Error())
|
||||
}
|
||||
defer d.Close()
|
||||
|
||||
names, err := d.Readdirnames(0)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue