compose_yml 0.0.59

Parse, manipulate and serialize docker-compose.yml in a strongly-typed fashion
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Parse a docker-compose.yml file and print it to standard output in
//! normalized format.

use compose_yml::v2 as dc;
use std::io::{self, Write};

fn normalize() -> dc::Result<()> {
    let file = dc::File::read(io::stdin())?;
    file.write(&mut io::stdout())?;
    Ok(())
}

fn main() {
    if let Err(ref err) = normalize() {
        write!(io::stderr(), "Error: {}", err).unwrap();
    }
}