feat(miniooni): make CLI much more user friendly (#913)
Part of https://github.com/ooni/probe/issues/2184, because I wanted to allow swapping commands and options more freely. As a side effect, this PR closes https://github.com/ooni/probe/issues/2248. AFAICT, every usage that was legal before is still legal. What has changed seems the freedom to swap commands and options and a much better help that lists the available options.
This commit is contained in:
parent
7daa686c68
commit
0bc6aae601
38 changed files with 265 additions and 124 deletions
|
|
@ -16,7 +16,7 @@ import (
|
|||
// ooniRunMain runs the experiments described by the given OONI Run URLs. This
|
||||
// function works with both v1 and v2 OONI Run URLs.
|
||||
func ooniRunMain(ctx context.Context,
|
||||
sess *engine.Session, currentOptions Options, annotations map[string]string) {
|
||||
sess *engine.Session, currentOptions *Options, annotations map[string]string) {
|
||||
runtimex.PanicIfTrue(
|
||||
len(currentOptions.Inputs) <= 0,
|
||||
"in oonirun mode you need to specify at least one URL using `-i URL`",
|
||||
|
|
|
|||
Loading…
Reference in a new issue