summaryrefslogtreecommitdiff
path: root/src/main.rs
blob: e708402196871f976011b09596ef7b1135bf21b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#[macro_use]
extern crate quicli;
extern crate ansi_term;

use quicli::prelude::*;
use ansi_term::Color::Yellow;

#[macro_use] mod macros;
mod about_variables;

#[derive(Debug, StructOpt)]
struct Cli {
    exercise: Option<String>,
}

main!(|args: Cli| if let Some(e) = args.exercise {
    println!("selected {}", e);
} else {
    println!("Welcome to {}!\n", Yellow.paint("Rustlings"));
    about_variables::exec();
});