Merge pull request #238 from AleoHQ/feat/rename

Renames load and unload to add and remove
This commit is contained in:
Howard Wu 2020-08-15 02:53:26 -07:00 committed by GitHub
commit b3ee78155b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 16 deletions

View File

@ -13,16 +13,16 @@ use clap::ArgMatches;
use std::{convert::TryFrom, env::current_dir};
#[derive(Debug)]
pub struct LoadCommand;
pub struct AddCommand;
impl CLI for LoadCommand {
impl CLI for AddCommand {
type Options = ();
type Output = ();
const ABOUT: AboutType = "Install a package from the package manager (*)";
const ARGUMENTS: &'static [ArgumentType] = &[];
const FLAGS: &'static [FlagType] = &[];
const NAME: NameType = "load";
const NAME: NameType = "add";
const OPTIONS: &'static [OptionType] = &[];
const SUBCOMMANDS: &'static [SubCommandType] = &[];
@ -39,7 +39,7 @@ impl CLI for LoadCommand {
// Get the package name
let _package_name = Manifest::try_from(&path)?.get_package_name();
log::info!("Unimplemented - `leo load`");
log::info!("Unimplemented - `leo add`");
Ok(())
}

View File

@ -13,8 +13,8 @@ pub use self::init::*;
pub mod lint;
pub use self::lint::*;
pub mod load;
pub use self::load::*;
pub mod add;
pub use self::add::*;
pub mod login;
pub use self::login::*;
@ -37,8 +37,8 @@ pub use self::setup::*;
pub mod test;
pub use self::test::*;
pub mod unload;
pub use self::unload::*;
pub mod remove;
pub use self::remove::*;
pub mod watch;
pub use self::watch::*;

View File

@ -13,16 +13,16 @@ use clap::ArgMatches;
use std::{convert::TryFrom, env::current_dir};
#[derive(Debug)]
pub struct UnloadCommand;
pub struct RemoveCommand;
impl CLI for UnloadCommand {
impl CLI for RemoveCommand {
type Options = ();
type Output = ();
const ABOUT: AboutType = "Uninstall a package from the current package (*)";
const ARGUMENTS: &'static [ArgumentType] = &[];
const FLAGS: &'static [FlagType] = &[];
const NAME: NameType = "unload";
const NAME: NameType = "remove";
const OPTIONS: &'static [OptionType] = &[];
const SUBCOMMANDS: &'static [SubCommandType] = &[];
@ -40,7 +40,7 @@ impl CLI for UnloadCommand {
// Get the package name
let _package_name = Manifest::try_from(&path)?.get_package_name();
log::info!("Unimplemented - `leo load`");
log::info!("Unimplemented - `leo remove`");
Ok(())
}

View File

@ -25,8 +25,8 @@ fn main() -> Result<(), CLIError> {
BuildCommand::new().display_order(2),
TestCommand::new().display_order(3),
LintCommand::new().display_order(4),
LoadCommand::new().display_order(5),
UnloadCommand::new().display_order(6),
AddCommand::new().display_order(5),
RemoveCommand::new().display_order(6),
SetupCommand::new().display_order(7),
ProveCommand::new().display_order(8),
RunCommand::new().display_order(9),
@ -45,8 +45,8 @@ fn main() -> Result<(), CLIError> {
("build", Some(arguments)) => BuildCommand::process(arguments),
("test", Some(arguments)) => TestCommand::process(arguments),
("lint", Some(arguments)) => LintCommand::process(arguments),
("load", Some(arguments)) => LoadCommand::process(arguments),
("unload", Some(arguments)) => UnloadCommand::process(arguments),
("add", Some(arguments)) => AddCommand::process(arguments),
("remove", Some(arguments)) => RemoveCommand::process(arguments),
("setup", Some(arguments)) => SetupCommand::process(arguments),
("prove", Some(arguments)) => ProveCommand::process(arguments),
("run", Some(arguments)) => RunCommand::process(arguments),