Use cli parser with auto-generated help

This commit is contained in:
Aleksey Kladov 2021-03-01 21:12:44 +03:00
parent 9860a39603
commit 4ce20b80c5
8 changed files with 195 additions and 134 deletions

View file

@ -9,13 +9,11 @@ use std::{
use anyhow::{bail, format_err, Result};
use xshell::{cmd, mkdir_p, pushd, pushenv, read_file, rm_rf};
use crate::flags;
type Unit = String;
pub(crate) struct MetricsCmd {
pub(crate) dry_run: bool,
}
impl MetricsCmd {
impl flags::Metrics {
pub(crate) fn run(self) -> Result<()> {
let mut metrics = Metrics::new()?;
if !self.dry_run {