This repository has been archived on 2026-01-06. You can view files and clone it, but cannot push or open issues/pull-requests.
vieter/src/docker/containers.v

16 lines
262 B
V

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