1package publicsuffix_test
2
3import (
4 "context"
5 "fmt"
6 "log/slog"
7
8 "github.com/mjl-/mox/dns"
9 "github.com/mjl-/mox/publicsuffix"
10)
11
12func ExampleLookup() {
13 // Lookup the organizational domain for sub.example.org.
14 orgDom := publicsuffix.Lookup(context.Background(), slog.Default(), dns.Domain{ASCII: "sub.example.org"})
15 fmt.Println(orgDom)
16 // Output: example.org
17}
18