forked from vieter-v/vieter
refactor(util): split into two files
This commit is contained in:
parent
1d3c7a1651
commit
055b168ff1
7 changed files with 114 additions and 107 deletions
|
|
@ -1,5 +1,3 @@
|
|||
# docker
|
||||
|
||||
This module implements part of the Docker Engine API v1.41
|
||||
([documentation](https://docs.docker.com/engine/api/v1.41/)) using socket-based
|
||||
HTTP communication.
|
||||
|
|
|
|||
|
|
@ -58,9 +58,9 @@ pub fn (mut r ChunkedResponseReader) read(mut buf []u8) ?int {
|
|||
// This function should only be called if the previous chunk has been
|
||||
// completely consumed.
|
||||
fn (mut r ChunkedResponseReader) read_chunk_size() ?u64 {
|
||||
mut buf := []u8{len: 2}
|
||||
|
||||
if r.started {
|
||||
mut buf := []u8{len: 2}
|
||||
|
||||
// Each chunk ends with a `\r\n` which we want to skip first
|
||||
r.reader.read(mut buf)?
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue