85b16c8bd2
We've been flattening the package structure for some time now. While there, add very basic examples.
21 lines
443 B
Go
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")
|
|
}
|