ooni-probe-cli/internal/cmd
Simone Basso 086ae43b15
refactor(engine): set options from any value (#837)
This diff refactors how we set options for experiments to accept
in input an any value or a map[string]any, depending on which method
we choose to actually set options.

There should be no functional change, except that now we're not
guessing the type and then attempting to set the value of the selected
field: now, instead, we match the provided type and the field's type
as part of the same function (i.e., SetOptionAny).

This diff is functional to https://github.com/ooni/probe/issues/2184,
because it will allow us to load options from a map[string]any,
which will be part of the OONI Run v2 JSON descriptor.

If we didn't apply this change, we would only have been to set options
from a map[string]string, which is good enough as a solution for the
CLI but is definitely clumsy when you have to write stuff like:

```JSON
{
  "options": {
    "HTTP3Enabled": "true"
  }
}
```

when you could instead more naturally write:

```JSON
{
  "options": {
    "HTTP3Enabled": true
  }
}
```
2022-07-08 11:51:59 +02:00
..
apitool cleanup: mark more integration tests as !short mode (#755) 2022-05-24 21:01:15 +02:00
e2epostprocess cleanup(all): stop using deprecated ioutil functions (#381) 2021-06-15 14:01:45 +02:00
getresources refactor: redesign how we import assets (#260) 2021-04-01 16:57:31 +02:00
jafar cleanup(jafar): do not depend on netx and urlgetter (#792) 2022-06-02 22:25:37 +02:00
miniooni refactor(engine): set options from any value (#837) 2022-07-08 11:51:59 +02:00
oohelper refactor(netxlite): expose useful HTTPTransport/DNSTransport factories (#813) 2022-06-09 00:30:18 +02:00
oohelperd refactor(oohelperd): improve tests implementation (#835) 2022-07-05 20:25:18 +02:00
oonireport cleanup: mark more integration tests as !short mode (#755) 2022-05-24 21:01:15 +02:00
printversion fix: ensure we bind oohelperd with the repo's version number (#558) 2021-10-22 17:21:38 +02:00
README.md doc: ensure all top dirs have an explanatory README (#214) 2021-02-03 16:54:00 +01:00

Directory github.com/ooni/probe-cli/internal/cmd

This directory contains the source code for the CLI tools we build but we don't want to expose to the outside world. That is, you can only build these tools if you have cloned this repo.