ooni-probe-cli/internal/engine/experiment/dash/locate.go
Simone Basso 85b16c8bd2
refactor(mlablocate*): move from i/e/internal to internal (#385)
We've been flattening the package structure for some time now.

While there, add very basic examples.
2021-06-15 19:51:03 +02:00

21 lines
443 B
Go

package dash
import (
"context"
"net/http"
"github.com/ooni/probe-cli/v3/internal/engine/model"
"github.com/ooni/probe-cli/v3/internal/mlablocate"
)
type locateDeps interface {
HTTPClient() *http.Client
Logger() model.Logger
UserAgent() string
}
func locate(ctx context.Context, deps locateDeps) (mlablocate.Result, error) {
return mlablocate.NewClient(
deps.HTTPClient(), deps.Logger(), deps.UserAgent()).Query(ctx, "neubot")
}