summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2021-04-10 09:19:03 +0300
committerLars Wirzenius <liw@liw.fi>2021-04-10 10:29:27 +0300
commitc196a68471dd9dafbcc4030342aa4164d7a2d3e3 (patch)
treee1c3441158fa4843ad8f0bf1165417ad6e69aed9 /src/bin
parent82eb02a0437ba8a7bf2025f5b61864b450ee68b2 (diff)
downloadobnam2-c196a68471dd9dafbcc4030342aa4164d7a2d3e3.tar.gz
refactor: struct List subcommand
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/obnam.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/bin/obnam.rs b/src/bin/obnam.rs
index f639153..9e0ab0f 100644
--- a/src/bin/obnam.rs
+++ b/src/bin/obnam.rs
@@ -4,7 +4,8 @@ use log4rs::append::file::FileAppender;
use log4rs::config::{Appender, Config, Logger, Root};
use obnam::cmd::backup::Backup;
use obnam::cmd::init::Init;
-use obnam::cmd::{get_chunk, list, list_files, restore, show_config, show_generation};
+use obnam::cmd::list::List;
+use obnam::cmd::{get_chunk, list_files, restore, show_config, show_generation};
use obnam::config::ClientConfig;
use std::path::{Path, PathBuf};
use structopt::StructOpt;
@@ -30,7 +31,7 @@ fn main() -> anyhow::Result<()> {
match opt.cmd {
Command::Init(_) => panic!("this cannot happen"),
Command::Backup(x) => x.run(&config),
- Command::List => list(&config),
+ Command::List(x) => x.run(&config),
Command::ShowGeneration { gen_id } => show_generation(&config, &gen_id),
Command::ListFiles { gen_id } => list_files(&config, &gen_id),
Command::Restore { gen_id, to } => restore(&config, &gen_id, &to),
@@ -98,7 +99,7 @@ struct Opt {
enum Command {
Init(Init),
Backup(Backup),
- List,
+ List(List),
ListFiles {
#[structopt(default_value = "latest")]
gen_id: String,