Documentation
This commit is contained in:
parent
5de08ff3dc
commit
b0a9805be9
|
@ -15,7 +15,7 @@ import (
|
||||||
"net"
|
"net"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Wrap the contents of the /etc/resolv.conf.
|
// Wraps the contents of the /etc/resolv.conf.
|
||||||
type ClientConfig struct {
|
type ClientConfig struct {
|
||||||
Servers []string // servers to use
|
Servers []string // servers to use
|
||||||
Search []string // suffixes to append to local name
|
Search []string // suffixes to append to local name
|
||||||
|
@ -27,7 +27,7 @@ type ClientConfig struct {
|
||||||
|
|
||||||
// See resolv.conf(5) on a Linux machine.
|
// See resolv.conf(5) on a Linux machine.
|
||||||
// Parse a /etc/resolv.conf like file and return a filled out ClientConfig. Note
|
// Parse a /etc/resolv.conf like file and return a filled out ClientConfig. Note
|
||||||
// that all nameservers will have the port number appendend (:53)
|
// that all nameservers will have the default port number appended (:53)
|
||||||
func ClientConfigFromFile(conf string) (*ClientConfig, os.Error) {
|
func ClientConfigFromFile(conf string) (*ClientConfig, os.Error) {
|
||||||
file, err := os.Open(conf)
|
file, err := os.Open(conf)
|
||||||
defer file.Close()
|
defer file.Close()
|
||||||
|
|
4
dns.go
4
dns.go
|
@ -31,10 +31,10 @@
|
||||||
// m1.Question[0] = Question{"miek.nl", TypeDNSKEY, ClassINET}
|
// m1.Question[0] = Question{"miek.nl", TypeDNSKEY, ClassINET}
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// Basic use pattern for synchronize querying of the DNS using
|
// Basic use pattern for synchronize querying of the DNS
|
||||||
// UDP as the protocol.
|
|
||||||
//
|
//
|
||||||
// c := dns.NewClient()
|
// c := dns.NewClient()
|
||||||
|
// // c.Net = "tcp" // If you want to use TCP
|
||||||
// in := c.Exchange(m, "127.0.0.1:53")
|
// in := c.Exchange(m, "127.0.0.1:53")
|
||||||
//
|
//
|
||||||
package dns
|
package dns
|
||||||
|
|
Loading…
Reference in New Issue