Skip to content

Commit

Permalink
Give a proper project structure to fakemall (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
dottorblaster authored Oct 4, 2023
1 parent 487d7ad commit 9169a59
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
Empty file removed src/builder.rs
Empty file.
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub mod set;
13 changes: 3 additions & 10 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
mod set;

use anyhow::Result;
use clap::{Parser, Subcommand};

Expand All @@ -10,6 +8,9 @@ use std::{
path::PathBuf,
process,
};

use fakemall::set;

/// A simple tool for building fake command line interfaces
#[derive(Parser)]
#[command(author, version, about, long_about = None)]
Expand All @@ -28,13 +29,6 @@ enum Commands {
/// Command to execute
command: String,
},
/// Save a command output to a set
Save {
/// Set to save command to
set: String,
/// Command to save
command: String,
},
/// Build an environment from a set
Build {
/// Set to build
Expand All @@ -49,7 +43,6 @@ fn main() -> Result<()> {

match &cli.command {
Commands::Exec { set, command } => exec(set, command.trim()),
Commands::Save { .. } => todo!(),
Commands::Build { set, path } => build(set, path),
}
}
Expand Down
1 change: 1 addition & 0 deletions src/set.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use anyhow::Result;
use serde::Deserialize;

#[derive(Debug, Deserialize)]
pub struct Set {
pub commands: Vec<Command>,
Expand Down

0 comments on commit 9169a59

Please sign in to comment.