mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
all: require calling optfn() ?
/ optfn() or {...}
for fn optfn() ? {}
This commit is contained in:
parent
97103f680a
commit
e5a84719ca
90 changed files with 1994 additions and 1832 deletions
|
@ -126,7 +126,7 @@ fn (vd VDoc) render_search_index(out Output) {
|
|||
js_search_index.writeln('];')
|
||||
js_search_data.writeln('];')
|
||||
out_file_path := os.join_path(out.path, 'search_index.js')
|
||||
os.write_file(out_file_path, js_search_index.str() + js_search_data.str())
|
||||
os.write_file(out_file_path, js_search_index.str() + js_search_data.str()) or { panic(err) }
|
||||
}
|
||||
|
||||
fn (mut vd VDoc) render_static_html(out Output) {
|
||||
|
@ -162,7 +162,7 @@ fn (vd VDoc) get_resource(name string, out Output) string {
|
|||
output_path := os.join_path(out.path, name)
|
||||
if !os.exists(output_path) {
|
||||
println('Generating $out.typ in "$output_path"')
|
||||
os.write_file(output_path, res)
|
||||
os.write_file(output_path, res) or { panic(err) }
|
||||
}
|
||||
return name
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue