refactor(tor): rewrite using measurex (#652)
This diff rewrites the tor experiment to use measurex "easy" API. To this end, we need to introduce an "easy" measurex API, which basically performs easy measurements returning two pieces of data: 1. the resulting measurement, which is already using the OONI archival data format and is always non-nil 2. a failure (i.e., the pointer to an error string), which is nil on success and points to a string on failure With this change, we should now be able to completely dispose of the original netx API, which was only used by tor. Reference issue: https://github.com/ooni/probe/issues/1688.
This commit is contained in:
parent
f0181c432f
commit
dfa5e708fe
5 changed files with 421 additions and 141 deletions
|
|
@ -22,3 +22,8 @@ func PanicIfFalse(assertion bool, message string) {
|
|||
func PanicIfTrue(assertion bool, message string) {
|
||||
PanicIfFalse(!assertion, message)
|
||||
}
|
||||
|
||||
// PanicIfNil calls panic if the given interface is nil.
|
||||
func PanicIfNil(v interface{}, message string) {
|
||||
PanicIfTrue(v == nil, message)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue