Explorar el Código

No need to defer closing of file.

Blallo hace 5 años
padre
commit
9e0140b3e1
Se han modificado 1 ficheros con 0 adiciones y 1 borrados
  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
 	}