mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 15:18:49 +00:00
Update example to use err != nil instead
This commit is contained in:
@@ -38,9 +38,9 @@ iterate_csv_from_stream :: proc(filename: string) {
|
|||||||
r.reuse_record_buffer = true // Without it you have to each of the fields within it
|
r.reuse_record_buffer = true // Without it you have to each of the fields within it
|
||||||
defer csv.reader_destroy(&r)
|
defer csv.reader_destroy(&r)
|
||||||
|
|
||||||
handle, errno := os.open(filename)
|
handle, err := os.open(filename)
|
||||||
if errno != os.ERROR_NONE {
|
if err != nil {
|
||||||
fmt.printfln("Error opening file: %v", filename)
|
fmt.eprintfln("Error opening file: %v", filename)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
defer os.close(handle)
|
defer os.close(handle)
|
||||||
|
|||||||
Reference in New Issue
Block a user