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 } } ``` |
||
---|---|---|
.. | ||
.gitignore | ||
libminiooni_test.go | ||
libminiooni.go | ||
main.go | ||
README.md |
miniooni
This directory contains the source code of a simple CLI client that we use for research as well as for running QA scripts. We designed this tool to have a CLI similar to MK and OONI Probe v2.x to ease running Jafar scripts that check whether these tools behave similarly. Perfect backwards compatibility was not a design goal for miniooni. Rather, we aimed to have as little conflict as possible, such that we can run side-by-side QA checks.