mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
os: change f.write and f.writeln to return options too
This commit is contained in:
@ -925,7 +925,7 @@ A defer statement defers the execution of a block of statements until the surrou
|
||||
|
||||
```v
|
||||
fn read_log() {
|
||||
f := os.open('log.txt')
|
||||
f := os.open('log.txt') or { panic(err) }
|
||||
defer { f.close() }
|
||||
...
|
||||
if !ok {
|
||||
|
Reference in New Issue
Block a user