0bc6aae601
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.
13 lines
288 B
Go
13 lines
288 B
Go
package registry
|
|
|
|
// Where we register all the available experiments.
|
|
var AllExperiments = map[string]*Factory{}
|
|
|
|
// ExperimentNames returns the name of all experiments
|
|
func ExperimentNames() (names []string) {
|
|
for key := range AllExperiments {
|
|
names = append(names, key)
|
|
}
|
|
return
|
|
}
|