添加工具 help 说明

Signed-off-by: Jia Chao <jiac13@chinaunicom.cn>
This commit is contained in:
Jia Chao 2024-06-27 14:18:20 +08:00
parent c88ee97f76
commit e29b653964

View File

@ -1,6 +1,8 @@
use clap::Parser;
// 构建命令行工具的结构体
/// cvrf2cusa 是一个用于将 CVRFCommon Vulnerability Reporting Framework格式的安全报告转换为
/// CUSACULinux Security Advisory的工具其输入格式为 Xml ,输出格式则为 Json。
#[derive(Clone, Debug, Parser)]
#[command(author, version, about, long_about = None)]
pub struct Cli {
@ -18,6 +20,7 @@ pub struct Cli {
pub print: bool,
}
// 从命令行环境变量读取并转换为 `Cli`
pub fn parse() -> Cli {
Cli::parse()
}
}