v_scratch/09_defer/main.v

16 lines
155 B
V

import os
pub fn main(){
ok := false
mut f := os.open('log.txt') or { panic('File cannot be read!') }
defer{
f.close()
}
if !ok{
return
}
}