Dialer with SRV lookup.
import "github.com/koron-go/dialsrv"
// query SRV records for "_myservice._tcp.example.com" then make HTTP GET.
r, err := dialsrv.HTTPClient.Get("http://srv+myservice+example.com/")
// TODO: work with r and err as usual.
// GET from example.com without SRV.
r, err := dialsrv.HTTPClient.Get("http://example.com/")
// TODO: work with r and err as usual.
import "net/http"
// replace http.DefaultClient
http.DefaultClient = dialsrv.HTTPClient
r, err := http.Get("http://srv+myservice+example.com/")
// TODO: work with r and err as usual.
import "net"
import "github.com/koron-go/dialsrv"
// wrap *net.Dialer with SRV record querying
d := dialsrv.New(&net.Dialer{/* net.Dialer with your configurations */})
srv+{service}+{hostname}
- SRV for_{service}._{network}.{hostname}
srv+{hostname}
- SRV for{hostname}