From 889d5a08849a6ab08b41e6ff94b78f7a9624c460 Mon Sep 17 00:00:00 2001 From: Jef Roosens Date: Mon, 16 May 2022 15:39:23 +0200 Subject: [PATCH] refactor(docker): removed unused function --- src/docker/containers.v | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/src/docker/containers.v b/src/docker/containers.v index a790243..0bc59bb 100644 --- a/src/docker/containers.v +++ b/src/docker/containers.v @@ -9,27 +9,6 @@ struct DockerError { message string } -struct Container { - id string [json: Id] - names []string [json: Names] -} - -// containers returns a list of all containers. -pub fn (mut d DockerConn) containers() ?[]Container { - d.send_request(Method.get, urllib.parse('/v1.41/containers/json')?)? - head, res := d.read_response()? - - if head.status_code != 200 { - data := json.decode(DockerError, res)? - - return error(data.message) - } - - data := json.decode([]Container, res)? - - return data -} - pub struct NewContainer { image string [json: Image] entrypoint []string [json: Entrypoint]