diff options
Diffstat (limited to 'src/cmd/init.rs')
-rw-r--r-- | src/cmd/init.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cmd/init.rs b/src/cmd/init.rs index 08060f7..8e555ca 100644 --- a/src/cmd/init.rs +++ b/src/cmd/init.rs @@ -1,3 +1,5 @@ +//! The `init` subcommand. + use crate::config::ClientConfig; use crate::error::ObnamError; use crate::passwords::{passwords_filename, Passwords}; @@ -5,13 +7,16 @@ use structopt::StructOpt; const PROMPT: &str = "Obnam passphrase: "; +/// Initialize client by setting passwords. #[derive(Debug, StructOpt)] pub struct Init { + /// Only for testing. #[structopt(long)] insecure_passphrase: Option<String>, } impl Init { + /// Run the command. pub fn run(&self, config: &ClientConfig) -> Result<(), ObnamError> { let passphrase = match &self.insecure_passphrase { Some(x) => x.to_string(), |