Add initial module structure
This commit is contained in:
parent
38c492c362
commit
fd204ee05e
|
@ -1,2 +1,12 @@
|
|||
extern crate regex;
|
||||
extern crate toml;
|
||||
|
||||
extern crate libimagstore;
|
||||
|
||||
pub mod add;
|
||||
pub mod check;
|
||||
pub mod error;
|
||||
pub mod remove;
|
||||
pub mod result;
|
||||
pub mod tag;
|
||||
pub mod util;
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
pub type Tag = String;
|
|
@ -0,0 +1,5 @@
|
|||
use regex::Regex;
|
||||
|
||||
pub fn is_tag(s: &String) -> bool {
|
||||
Regex::new("^[a-zA-Z]([a-zA-Z0-9_-]*)$").unwrap().captures(&s[..]).is_some()
|
||||
}
|
Loading…
Reference in New Issue