Skip to content

Instantly share code, notes, and snippets.

@alarsyo
Last active July 16, 2018 13:42
Show Gist options
  • Save alarsyo/1f1141c66864131dabb6bbaea8690e2e to your computer and use it in GitHub Desktop.
Save alarsyo/1f1141c66864131dabb6bbaea8690e2e to your computer and use it in GitHub Desktop.
func resolveCustomAddress (c txtdirect.Config) {
net := net.Resolver {
PreferGo: true,
Dial: func (ctx context.Context, network, address string) (Conn, err) {
d := net.Dialer{}
return d.DialContext(ctx, network, c.Resolver)
},
}
txts := net.LookupTXT("example.com")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment