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

use new exit() everywhere

This commit is contained in:
Alexander Medvednikov
2019-06-23 10:41:42 +02:00
parent b2851daffc
commit a69e6febbc
5 changed files with 18 additions and 10 deletions

View File

@@ -33,7 +33,8 @@ fn (f mut Fetcher) fetch() {
f.mu.unlock()
resp := http.get('https://hacker-news.firebaseio.com/v0/item/${id}.json')
story := json.decode(Story, resp) or {
exit('failed to decode a story')
println('failed to decode a story')
exit(1)
}
println('#$f.cursor) $story.title')
}