refactor(util): split into two files

This commit is contained in:
Jef Roosens 2022-05-16 14:22:53 +02:00
parent 1d3c7a1651
commit 055b168ff1
Signed by untrusted user: Jef Roosens
GPG key ID: B75D4F293C7052DB
7 changed files with 114 additions and 107 deletions

View file

@ -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.

View file

@ -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)?
}