gray/cli.rs
1use std::collections::HashMap;
2use std::vec::Vec;
3
4#[derive(Debug,PartialEq)]
5pub struct App{
6 pub name : String,
7 pub authors:Vec<String>,
8 pub actions: HashMap<String,fn()>
9}
10
11pub fn default()-> App{
12 return App{
13 name: String::from("Test"),
14 authors : Vec::from([String::from("Test")]),
15 actions : HashMap::new()
16 }
17}
18
19
20
21fn new_app(name:String,authors:Vec<String>)-> App{
22 return App{
23 name: name,
24 authors : authors,
25 actions : HashMap::new()
26 }
27}