mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vfmt: change all '$expr' to '${expr}' (#16428)
This commit is contained in:
@@ -9,14 +9,14 @@ import os
|
||||
// and saves it in the output file path `out_file_path`.
|
||||
pub fn download_file(url string, out_file_path string) ! {
|
||||
$if debug_http ? {
|
||||
println('http.download_file url=$url out_file_path=$out_file_path')
|
||||
println('http.download_file url=${url} out_file_path=${out_file_path}')
|
||||
}
|
||||
s := get(url) or { return err }
|
||||
if s.status() != .ok {
|
||||
return error('received http code $s.status_code')
|
||||
return error('received http code ${s.status_code}')
|
||||
}
|
||||
$if debug_http ? {
|
||||
println('http.download_file saving $s.body.len bytes')
|
||||
println('http.download_file saving ${s.body.len} bytes')
|
||||
}
|
||||
os.write_file(out_file_path, s.body)!
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user