To this end, we need to refactor the implementation to give the DNSOverUDPChannel owenership over the net.Conn. Once this happens, DNSOverUDPChannel.Close closes the conn. When the conn is closed, the background goroutine will terminate immediately because any blocking I/O operation will be immediately unblocked and return net.ErrClosed. See https://github.com/ooni/probe/issues/2099#issuecomment-1139066946
Directory github.com/ooni/probe-cli/internal
This directory contains private Go packages.
As a reminder, you can always check the Go documentation of a package by using
go doc -all ./internal/$package
where $package
is the name of the package.
Some notable packages: