fn main() -> Result<(), Box<dyn std::error::Error>> {
let input = r#"
# Dev server configuration
allowed-hosts = ["localhost", "127.0.0.1"]
[defaults]
headers = { x-powered-by = "false", content-type = "text/html" }
[[backend]]
host = "10.0.0.1"
port = 8000
"#;
let mut doc = tomlini::parse(input)?;
doc.edit()
.array_push("allowed-hosts", "\"10.0.0.3\"")
.inline_set("defaults.headers", "content-type", "\"application/json\"")
.aot_push("backend", &[("host", "\"10.0.0.4\""), ("port", "9000")])
.commit()?;
println!("{}", doc);
Ok(())
}