build(deps): migrate to clap from structopt (#406)

This commit is contained in:
Sanchith Hegde
2023-01-18 20:12:47 +05:30
committed by GitHub
parent a9e5193b90
commit 34487c1717
8 changed files with 49 additions and 104 deletions

View File

@ -3,12 +3,11 @@ use router::{
core::errors::{ApplicationError, ApplicationResult},
logger,
};
use structopt::StructOpt;
#[actix_web::main]
async fn main() -> ApplicationResult<()> {
// get commandline config before initializing config
let cmd_line = CmdLineConf::from_args();
let cmd_line = <CmdLineConf as clap::Parser>::parse();
if let Some(Subcommand::GenerateOpenapiSpec) = cmd_line.subcommand {
let file_path = "openapi/generated.json";
#[allow(clippy::expect_used)]