summaryrefslogtreecommitdiff
path: root/src/cmd/show_config.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/show_config.rs')
-rw-r--r--src/cmd/show_config.rs14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/cmd/show_config.rs b/src/cmd/show_config.rs
index 8acd1c8..424e2ed 100644
--- a/src/cmd/show_config.rs
+++ b/src/cmd/show_config.rs
@@ -1,7 +1,13 @@
-use crate::client::ClientConfig;
+use crate::config::ClientConfig;
use crate::error::ObnamError;
+use structopt::StructOpt;
-pub fn show_config(config: &ClientConfig) -> Result<(), ObnamError> {
- println!("{}", serde_json::to_string_pretty(&config.config())?);
- Ok(())
+#[derive(Debug, StructOpt)]
+pub struct ShowConfig {}
+
+impl ShowConfig {
+ pub fn run(&self, config: &ClientConfig) -> Result<(), ObnamError> {
+ println!("{}", serde_json::to_string_pretty(&config.config())?);
+ Ok(())
+ }
}