gitignore-template-generator 0.3.1

A binary crate to generate templates for .gitignore files
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use super::api::CliArgsValidator;

pub struct DefaultCliArgsValidator;

impl CliArgsValidator for DefaultCliArgsValidator {
    fn has_no_commas(value: &str) -> Result<String, String> {
        if value.contains(',') {
            Err(String::from("Commas are not allowed in template names"))
        } else {
            Ok(value.to_string())
        }
    }
}