1
0
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:
Delyan Angelov
2020-09-12 08:31:15 +03:00
parent 332f3a924c
commit 60ecb7e4b6
2 changed files with 24 additions and 13 deletions

View File

@ -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 {