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

vlib/net: add buffered IO, x.net -> net (#6754)

This commit is contained in:
Emily Hudson
2020-11-15 20:54:47 +00:00
committed by GitHub
parent 20bec81678
commit cd2a2cef25
55 changed files with 741 additions and 1648 deletions

View File

@@ -118,7 +118,7 @@ fn main() {
exit(0)
}
context.files = real_files
if !context.write_file.ends_with('.v') {
if context.write_file != '' && !context.write_file.ends_with('.v') {
context.write_file += '.v'
}
mut file_byte_map := map[string][]byte{}
@@ -134,11 +134,11 @@ fn main() {
mut out_file := os.create(context.write_file) or {
panic(err)
}
out_file.write(context.header())
out_file.write_str(context.header())
for bname, fbytes in file_byte_map {
out_file.write(context.file2v(bname, fbytes, max_bname))
out_file.write_str(context.file2v(bname, fbytes, max_bname))
}
out_file.write(context.footer())
out_file.write_str(context.footer())
} else {
println(context.header())
for bname, fbytes in file_byte_map {