mirror of
https://github.com/odin-lang/Odin.git
synced 2026-07-22 07:31:10 +00:00
Merge pull request #7076 from tarsir/docs-fix-csv-examples
Fix errors in encoding/csv example docs
This commit is contained in:
@@ -49,7 +49,7 @@ Example:
|
||||
fmt.eprintfln("Unable to open file: %v. Error: %v", filename, err)
|
||||
return
|
||||
}
|
||||
csv.reader_init(&r, handle.stream)
|
||||
csv.reader_init(&r, os.to_stream(handle))
|
||||
|
||||
for r, i in csv.iterator_next(&r) {
|
||||
for f, j in r {
|
||||
@@ -67,7 +67,7 @@ Example:
|
||||
|
||||
csv_data, csv_err := os.read_entire_file(filename, context.allocator)
|
||||
defer delete(csv_data, context.allocator)
|
||||
if err != nil {
|
||||
if csv_err != nil {
|
||||
fmt.eprintfln("Unable to open file: %v. Error: %v", filename, csv_err)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user