diff --git a/core/pmtesting/testing.go b/core/pmtesting/testing.go index 79925811..f2aa215a 100644 --- a/core/pmtesting/testing.go +++ b/core/pmtesting/testing.go @@ -41,6 +41,7 @@ func init() { flag.BoolVar(&printStackOnExit, "print-stack-on-exit", false, "prints the stack before of shutting down") } +// TestHookFunc describes the functions passed to TestMainWithHooks. type TestHookFunc func() error // TestMain provides a simple unit test setup routine. diff --git a/netenv/main.go b/netenv/main.go index 2c360d6d..142da5bd 100644 --- a/netenv/main.go +++ b/netenv/main.go @@ -4,6 +4,7 @@ import ( "github.com/safing/portbase/modules" ) +// Event Names const ( NetworkChangedEvent = "network changed" OnlineStatusChangedEvent = "online status changed" diff --git a/netenv/online-status.go b/netenv/online-status.go index 0af161cc..1cd6964a 100644 --- a/netenv/online-status.go +++ b/netenv/online-status.go @@ -329,7 +329,7 @@ func checkOnlineStatus(ctx context.Context) { // this might be a weird captive portal, just direct the user there updateOnlineStatus(StatusPortal, "detectportal.firefox.com", "http request succeeded, response content not as expected") } - // close the body now as we plan to re-uise the http.Client + // close the body now as we plan to reuse the http.Client response.Body.Close() // 3) try a https request