add read config
This commit is contained in:
12
src/main.rs
12
src/main.rs
@@ -29,6 +29,10 @@ fn main() -> XResult<()> {
|
|||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if options.verbose {
|
||||||
|
print_message(MessageType::DEBUG, &format!("Config is: {}", &options.config));
|
||||||
|
}
|
||||||
|
|
||||||
println!("Hello, world!");
|
println!("Hello, world!");
|
||||||
println!("{}", SystemTime::now().duration_since(SystemTime::UNIX_EPOCH).unwrap().as_secs());
|
println!("{}", SystemTime::now().duration_since(SystemTime::UNIX_EPOCH).unwrap().as_secs());
|
||||||
|
|
||||||
@@ -44,7 +48,13 @@ fn main() -> XResult<()> {
|
|||||||
// let openpgp_client = OpenPGPTool::from_file("sample.gpg")?;
|
// let openpgp_client = OpenPGPTool::from_file("sample.gpg")?;
|
||||||
// openpgp_client.encrypt_file("a", "b.asc", true)?;
|
// openpgp_client.encrypt_file("a", "b.asc", true)?;
|
||||||
|
|
||||||
let config_json = get_config_json(None); // TODO
|
let config_json = get_config_json(if options.config == "" { None } else { Some(&options.config) });
|
||||||
|
if config_json.is_none() {
|
||||||
|
return Ok(());
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO ...
|
||||||
|
|
||||||
|
|
||||||
// let j = config_json.unwrap();
|
// let j = config_json.unwrap();
|
||||||
// println!("{}", j);
|
// println!("{}", j);
|
||||||
|
|||||||
Reference in New Issue
Block a user