vieter/src/docker/containers.v

16 lines
245 B
V

module docker
import json
import net.urllib
struct Container {
id string
names []string
}
pub fn containers() ?[]Container {
res := docker.get(urllib.parse('/containers/json') ?) ?
return json.decode([]Container, res.text)
}