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

vlib/io: fix reader bugs, make read_all take a config struct (#7361)

This commit is contained in:
Emily Hudson
2020-12-16 17:22:26 +00:00
committed by GitHub
parent 1a2c7cd336
commit 553ecf63e7
10 changed files with 227 additions and 75 deletions

View File

@@ -8,7 +8,7 @@ fn main() {
// Simple http HEAD request for a file
conn.write_str('HEAD /index.html HTTP/1.0\r\n\r\n')?
// Read all the data that is waiting
result := io.read_all(conn)?
result := io.read_all(reader: conn)?
// Cast to string and print result
println(result.bytestr())
}