File: subcontinued.rs

package info (click to toggle)
rust-jargon-args 0.2.5-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 200 kB
  • sloc: makefile: 4
file content (22 lines) | stat: -rw-r--r-- 421 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use jargon_args::Jargon;

fn main() {
    let mut j: Jargon = Jargon::from_env();
    j.on_subcommand("go", go);
}

fn go(v: Vec<String>) {
    println!("go!");
    let mut j: Jargon = Jargon::from_vec(v);
    j.on_subcommand("goo", goo)
}

fn goo(v: Vec<String>) {
    println!("goo!");
    let mut j: Jargon = Jargon::from_vec(v);
    j.on_subcommand("gooo", gooo)
}

fn gooo(_: Vec<String>) {
    println!("gooo!");
}