Skip to content
Snippets Groups Projects
conf.rs 528 B
Newer Older
Hugo Trentesaux's avatar
Hugo Trentesaux committed
use crate::*;
use serde::{Deserialize, Serialize};

#[derive(Serialize, Deserialize, Debug)]
pub struct Config {
	version: u8,
}

impl std::default::Default for Config {
	fn default() -> Self {
		Self {
			version: 0,
		}
	}
}


#[derive(Clone, Default, Debug, clap::Parser)]
pub enum Subcommand {
	#[default]
	/// Show config
	Show,
}

pub fn handle_command(data: Data, command: Subcommand) -> anyhow::Result<()> {
	// match subcommand
	match command {
		Subcommand::Show => {
			println!("{:?}", data.cfg);
		}
	};

	Ok(())
}