086ae43b15
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 } } ``` |
||
---|---|---|
.. | ||
apitool | ||
e2epostprocess | ||
getresources | ||
jafar | ||
miniooni | ||
oohelper | ||
oohelperd | ||
oonireport | ||
printversion | ||
README.md |
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.