diff options
| author | gingerBill <bill@gingerbill.org> | 2024-08-04 12:25:50 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2024-08-04 12:25:50 +0100 |
| commit | 5f7fef92fa0b901f21c442e7996c2cb8e2f3de78 (patch) | |
| tree | c5f2a9de0673035fc5b93ad2ac224fbfb87d1788 | |
| parent | 66b86bc7e02d7b43f869f5ce1c3451515b291cdd (diff) | |
Update example to use `err != nil` instead
| -rw-r--r-- | core/encoding/csv/example.odin | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/encoding/csv/example.odin b/core/encoding/csv/example.odin index 24722589d..d791eb33b 100644 --- a/core/encoding/csv/example.odin +++ b/core/encoding/csv/example.odin @@ -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 defer csv.reader_destroy(&r) - handle, errno := os.open(filename) - if errno != os.ERROR_NONE { - fmt.printfln("Error opening file: %v", filename) + handle, err := os.open(filename) + if err != nil { + fmt.eprintfln("Error opening file: %v", filename) return } defer os.close(handle) |