diff --git a/pkg/file/file.go b/pkg/file/file.go index 0c4a108..e1c3656 100644 --- a/pkg/file/file.go +++ b/pkg/file/file.go @@ -12,10 +12,10 @@ import ( func ReadingLines(filename string) []string { var result []string file, err := os.Open(filename) - defer file.Close() if err != nil { return result } + defer file.Close() scanner := bufio.NewScanner(file) for scanner.Scan() {