Browse Source

No need to defer closing of file.

Blallo 5 years ago
parent
commit
9e0140b3e1
1 changed files with 0 additions and 1 deletions
  1. 0 1
      sizer/main.go

+ 0 - 1
sizer/main.go

@@ -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
 	}