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.
This commit is contained in:
Simone Basso 2021-06-15 19:51:03 +02:00 committed by GitHub
commit 85b16c8bd2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 40 additions and 2 deletions

View file

@ -0,0 +1,19 @@
package mlablocate_test
import (
"context"
"fmt"
"net/http"
"github.com/apex/log"
"github.com/ooni/probe-cli/v3/internal/mlablocate"
)
func Example_usage() {
clnt := mlablocate.NewClient(http.DefaultClient, log.Log, "miniooni/0.1.0-dev")
result, err := clnt.Query(context.Background(), "neubot/dash")
if err != nil {
log.WithError(err).Fatal("clnt.Query failed")
}
fmt.Printf("%s\n", result.FQDN)
}