mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-04-28 03:00:18 -04:00
util/cli: Add macro for cli description for use with clap::about.
This commit is contained in:
@@ -97,3 +97,14 @@ impl TryFrom<UrlConfig> for url::Url {
|
||||
Ok(url)
|
||||
}
|
||||
}
|
||||
|
||||
pub const ANSI_LOGO: &str = include_str!("../../contrib/darkfi.ansi");
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! cli_desc {
|
||||
() => {{
|
||||
let mut desc = env!("CARGO_PKG_DESCRIPTION").to_string();
|
||||
desc.push_str(darkfi::util::cli::ANSI_LOGO);
|
||||
Box::leak(desc.into_boxed_str()) as &'static str
|
||||
}};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user