1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
v/examples/logfatal.v

12 lines
178 B
V
Raw Normal View History

import log
[noreturn]
fn should_not_return(mut logger log.Log) {
logger.fatal('${@FILE_LINE}: yikes!')
}
fn main() {
mut my_log := log.Log{}
should_not_return(mut my_log)
}