From 4e99e5030a3a5d1318444be6140fe2806d7772d6 Mon Sep 17 00:00:00 2001 From: Simone Basso Date: Wed, 17 Aug 2022 12:17:52 +0200 Subject: [PATCH] fix(registry): ensure we can run telegram and webconnectivity (#862) I made a mistake while adapting code from an experimental branch thus breaking these two experiments because of interface conversion. This diff fixes it. While there, remove the panic trap for miniooni. Because miniooni is an experimental tool, we want to see the full panic text, which definitely leads to a more pleasant and effective debugging experience. See https://github.com/ooni/probe/issues/2216 for context on why we were trying to change how we register experiments. The broken commit is https://github.com/ooni/probe-cli/commit/6a0ae5c70b68a72206ff7ffb530c758661545cc4. --- internal/cmd/miniooni/main.go | 10 ---------- internal/registry/telegram.go | 2 +- internal/registry/webconnectivity.go | 2 +- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/internal/cmd/miniooni/main.go b/internal/cmd/miniooni/main.go index 75b4e75..f65fc84 100644 --- a/internal/cmd/miniooni/main.go +++ b/internal/cmd/miniooni/main.go @@ -6,16 +6,6 @@ package main // Main function // -import ( - "fmt" - "os" -) - func main() { - defer func() { - if s := recover(); s != nil { - fmt.Fprintf(os.Stderr, "FATAL: %s\n", s) - } - }() Main() } diff --git a/internal/registry/telegram.go b/internal/registry/telegram.go index 6881d21..3c20980 100644 --- a/internal/registry/telegram.go +++ b/internal/registry/telegram.go @@ -16,7 +16,7 @@ func init() { config.(telegram.Config), ) }, - config: &telegram.Config{}, + config: telegram.Config{}, interruptible: false, inputPolicy: model.InputNone, } diff --git a/internal/registry/webconnectivity.go b/internal/registry/webconnectivity.go index dc7cefe..69e27aa 100644 --- a/internal/registry/webconnectivity.go +++ b/internal/registry/webconnectivity.go @@ -16,7 +16,7 @@ func init() { config.(webconnectivity.Config), ) }, - config: &webconnectivity.Config{}, + config: webconnectivity.Config{}, interruptible: false, inputPolicy: model.InputOrQueryBackend, }