/// Example command implementation
/// This serves as a template for future command implementations
use crate::error::{DataTransferError, Result};

/// Run the example command
pub fn run(input: Option<String>) -> Result<()> {
    match input {
        Some(value) => {
            println!("Processing input: {}", value);
            Ok(())
        }
        None => Err(DataTransferError::CommandError(
            "No input provided".to_string(),
        )),
    }
}

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn test_run_with_input() {
        let result = run(Some("test".to_string()));
        assert!(result.is_ok());
    }

    #[test]
    fn test_run_without_input() {
        let result = run(None);
        assert!(result.is_err());
    }
}
