guoguangwu 1 anno fa
parent
commit
27d9ebad38
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  1. 1 0
      config/configurators/configurators.go

+ 1 - 0
config/configurators/configurators.go

@@ -66,6 +66,7 @@ func StringSliceFile(s *[]string, filepath string) error {
 	if err != nil {
 		return fmt.Errorf("Can't open file %s\n", filepath)
 	}
+	defer f.Close()
 
 	scanner := bufio.NewScanner(f)
 	for scanner.Scan() {