Function vdot::run

source ·
pub fn run(args: Args) -> Result<()>
Expand description

Use the given command line arguments to run vdot.

Examples

use log::error;
use std::path::PathBuf;
use std::process;
use vdot::Args;
use reqwest::Url;

let args = Args {
    paths: vec![],
    output: PathBuf::from(".env"),
    vault_token: "hunter2".to_string(),
    vault_address: Url::parse("http://127.0.0.1:8200").unwrap(),
    vault_kv_version: 2,
    verbose: false
};

if let Err(err) = vdot::run(args) {
    error!("{}", err);
    process::exit(1);
}

Errors

Returns an error if anything goes wrong, and exits the process with a status code of 1.