1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
use crate::types::command::create_alias_command; use crate::utils::pckg; use duckscript::types::command::Command; use duckscript::types::error::ScriptError; #[cfg(test)] #[path = "./mod_test.rs"] mod mod_test; pub(crate) fn create(package: &str) -> Result<Box<dyn Command>, ScriptError> { let name = pckg::concat(package, "ArrayContains"); let command = create_alias_command( name, vec!["array_contains".to_string()], include_str!("help.md").to_string(), "array_contains".to_string(), include_str!("script.ds").to_string(), 2, )?; Ok(Box::new(command)) }