refactor: rename some image functions

fix-segfaults
Jef Roosens 2023-01-05 13:00:18 +01:00
parent 2db4afc226
commit 6b578a80cd
Signed by: Jef Roosens
GPG Key ID: B75D4F293C7052DB
1 changed files with 4 additions and 4 deletions

View File

@ -12,8 +12,8 @@ pub fn (mut d DockerConn) image_inspect(image string) !Image {
return data return data
} }
// pull_image pulls the given image:tag. // image_pull pulls the given image:tag.
pub fn (mut d DockerConn) pull_image(image string, tag string) ! { pub fn (mut d DockerConn) image_pull(image string, tag string) ! {
d.request(.post, '/images/create', { d.request(.post, '/images/create', {
'fromImage': image 'fromImage': image
'tag': tag 'tag': tag
@ -33,7 +33,7 @@ pub fn (mut d DockerConn) pull_image(image string, tag string) ! {
} }
// create_image_from_container creates a new image from a container. // create_image_from_container creates a new image from a container.
pub fn (mut d DockerConn) create_image_from_container(id string, repo string, tag string) !Image { pub fn (mut d DockerConn) image_from_container(id string, repo string, tag string) !Image {
d.request(.post, '/commit', { d.request(.post, '/commit', {
'container': id 'container': id
'repo': repo 'repo': repo
@ -45,7 +45,7 @@ pub fn (mut d DockerConn) create_image_from_container(id string, repo string, ta
} }
// remove_image removes the image with the given id. // remove_image removes the image with the given id.
pub fn (mut d DockerConn) remove_image(id string) ! { pub fn (mut d DockerConn) image_remove(id string) ! {
d.request(.delete, '/images/$id', {}) d.request(.delete, '/images/$id', {})
d.send()! d.send()!
d.read_response()! d.read_response()!