Skip to content

Commit

Permalink
docs(command): document parse_args
Browse files Browse the repository at this point in the history
Signed-off-by: Christina Sørensen <[email protected]>
  • Loading branch information
cafkafk committed Sep 22, 2023
1 parent e0c1e58 commit e871fcc
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/cli/command.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
use clap::{arg, command, crate_authors, Arg, ArgMatches};

/// Parses command-line arguments using the `clap` library.
///
/// # Returns
///
/// Returns an instance of `ArgMatches` which contains the parsed arguments.
///
/// # Arguments
///
/// - `--init`: Initializes the `powertest.toml` file.
/// - `-c` or `--config <config>`: Specifies the configuration file.
/// - `-D` or `--dump <dump>`: Specifies the dump directory.
/// - `-r` or `--run <run>`: Specifies the help command.
/// - `-d` or `--depth <depth>`: Specifies the maximum set length. The value should be of type `usize`.
///
/// # Examples
///
/// ```bash
/// $ my_program --init
/// $ my_program -c my_config.toml
/// $ my_program --dump ./dumps/
/// $ my_program --run help_command
/// $ my_program --depth 5
/// ```
pub fn parse_args() -> ArgMatches {
command!()
.author(crate_authors!("\n"))
Expand Down

0 comments on commit e871fcc

Please sign in to comment.