@@ -3,23 +3,21 @@ mod core;
33mod modules;
44mod services;
55
6- use crate :: cli:: { CliArgs , Commands } ;
76use clap:: Parser ;
7+ use std:: error:: Error ;
88
99#[ tokio:: main]
10- async fn main ( ) {
11- let args = CliArgs :: parse ( ) ;
10+ async fn main ( ) -> Result < ( ) , Box < dyn Error > > {
11+ let args = cli :: CliArgs :: parse ( ) ;
1212
1313 match args. command {
14- Commands :: Git ( args) => modules:: git:: git:: handle ( args) ,
15- Commands :: Scan ( args) => modules:: docker:: scan:: handle ( args) ,
16- Commands :: Docker ( args) => modules:: docker:: docker:: handle ( args) ,
17- Commands :: Auth ( args) => services:: auth:: handle ( args) ,
18- Commands :: Log ( args) => modules:: git:: log:: handle ( & args) ,
19- Commands :: Http ( args) => {
20- if let Err ( e) = modules:: http:: handler:: handle ( args. action ) . await {
21- eprintln ! ( "Error: {}" , e) ;
22- }
23- }
14+ cli:: Commands :: Git ( args) => modules:: git:: handle ( args) ,
15+ cli:: Commands :: Scan ( args) => modules:: docker:: scan:: handle ( args) ,
16+ cli:: Commands :: Docker ( args) => modules:: docker:: handle ( args) ,
17+ cli:: Commands :: Auth ( args) => services:: auth:: handle ( args) ,
18+ cli:: Commands :: Log ( args) => modules:: git:: log:: handle ( & args) ,
19+ cli:: Commands :: Http ( args) => modules:: http:: handler:: handle ( args. action ) . await ?,
2420 }
21+
22+ Ok ( ( ) )
2523}
0 commit comments