summaryrefslogtreecommitdiffstats
path: root/examples/networkdelete.rs
blob: e419f9089105fbbffc2f0bf28d53bed7bd95b144 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use shiplift::Docker;
use std::env;

#[tokio::main]
async fn main() {
    let docker = Docker::new();
    let id = env::args()
        .nth(1)
        .expect("You need to specify a network id");

    if let Err(e) = docker.networks().get(&id).delete().await {
        eprintln!("Error: {}", e)
    }
}