add opt.rs
This commit is contained in:
11
src/main.rs
11
src/main.rs
@@ -2,19 +2,30 @@ extern crate sequoia_openpgp as openpgp;
|
||||
pub mod oss_util;
|
||||
pub mod pgp_util;
|
||||
pub mod config_util;
|
||||
pub mod opt;
|
||||
|
||||
use std::{
|
||||
time::SystemTime,
|
||||
};
|
||||
use rust_util::{
|
||||
XResult,
|
||||
util_msg::*,
|
||||
};
|
||||
use config_util::*;
|
||||
// use pgp_util::OpenPGPTool;
|
||||
use opt::{
|
||||
Options,
|
||||
};
|
||||
|
||||
// https://docs.sequoia-pgp.org/sequoia_openpgp/serialize/stream/struct.Encryptor.html
|
||||
// https://gitlab.com/sequoia-pgp/sequoia/blob/master/openpgp/examples/generate-encrypt-decrypt.rs
|
||||
fn main() -> XResult<()> {
|
||||
let options = Options::new_and_parse_args()?;
|
||||
if options.version {
|
||||
print_message(MessageType::INFO, "VERSION!!!");
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
println!("Hello, world!");
|
||||
|
||||
println!("{}", SystemTime::now().duration_since(SystemTime::UNIX_EPOCH).unwrap().as_secs());
|
||||
|
||||
Reference in New Issue
Block a user