We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8af9f59 commit 1679125Copy full SHA for 1679125
1 file changed
go-runner/src/cli.rs
@@ -43,6 +43,15 @@ impl Cli {
43
}
44
45
46
+ /// Parses the command-line arguments into a Cli instance.
47
+ ///
48
+ /// # Why not use clap or structopt?
49
50
+ /// Unfortunately `go test` supports arguments with a different syntax than those crates. For
51
+ /// example, `-bench` and `-benchtime` use single dashes instead of double dashes.
52
53
+ /// We can't do this with clap/structopt, because they only support single dashes for single-letter
54
+ /// flags (e.g., `-h`), and double dashes for multi-letter flags (e.g., `--help`).
55
fn parse_args(mut args: impl Iterator<Item = String>) -> Result<Self, CliExit> {
56
let mut instance = Self::default();
57
0 commit comments