Skip to content

Commit 9ae244b

Browse files
committed
refactor: removed unnecessary pointers to slices
1 parent 488d5a2 commit 9ae244b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

filesystem/read_files.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,12 @@ func CloseFile(file *os.File) error {
7171
//
7272
// Returns:
7373
//
74-
// - *[][]string: A pointer to a slice of string slices containing the CSV records
75-
// - *[]string: A pointer to a slice of strings containing the headers (if readHeaders is true)
74+
// - [][]string: A slice of string slices containing the CSV records
75+
// - []string: A slice of strings containing the headers (if readHeaders is true)
7676
// - error: An error if something went wrong
7777
func ReadCSVFile(file *os.File, readHeaders bool) (
78-
*[][]string,
79-
*[]string,
78+
[][]string,
79+
[]string,
8080
error,
8181
) {
8282
// Check if the file is nil
@@ -111,7 +111,7 @@ func ReadCSVFile(file *os.File, readHeaders bool) (
111111
}
112112

113113
if readHeaders {
114-
return &records, &headers, nil
114+
return records, headers, nil
115115
}
116-
return &records, nil, nil
116+
return records, nil, nil
117117
}

0 commit comments

Comments
 (0)