mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
all: update repo to use the new error handling syntax (#8950)
This commit is contained in:
parent
b9a381f101
commit
d63b7bc35a
135 changed files with 487 additions and 468 deletions
|
@ -171,12 +171,12 @@ fn data_get() []SiteConfig {
|
|||
|
||||
fn data_dump(data []SiteConfig) {
|
||||
a := json.encode_pretty(data)
|
||||
os.write_file(os.resource_abs_path('data.json'), a) or { panic(err) }
|
||||
os.write_file(os.resource_abs_path('data.json'), a) or { panic(err.msg) }
|
||||
}
|
||||
|
||||
fn data_load() []SiteConfig {
|
||||
data := os.read_file(os.resource_abs_path('data.json')) or { panic(err) }
|
||||
a := json.decode([]SiteConfig, data) or { panic(err) }
|
||||
data := os.read_file(os.resource_abs_path('data.json')) or { panic(err.msg) }
|
||||
a := json.decode([]SiteConfig, data) or { panic(err.msg) }
|
||||
return a
|
||||
}
|
||||
|
||||
|
@ -192,5 +192,5 @@ fn main() {
|
|||
// data_dump(data)
|
||||
b := filled_in_template()
|
||||
println(b)
|
||||
os.write_file('result.md', b) or { panic(err) }
|
||||
os.write_file('result.md', b) or { panic(err.msg) }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue