Fix documentation too
This commit is contained in:
parent
9705bb8077
commit
2e02b42558
4
dns.go
4
dns.go
|
@ -16,7 +16,7 @@
|
|||
// Resource records are native types. They are not stored in wire format.
|
||||
// Basic usage pattern for creating a new resource record:
|
||||
//
|
||||
// r := new(dns.RR_MX)
|
||||
// r := new(dns.MX)
|
||||
// r.Hdr = dns.RR_Header{Name: "miek.nl.", Rrtype: dns.TypeMX, Class: dns.ClassINET, Ttl: 3600}
|
||||
// r.Pref = 10
|
||||
// r.Mx = "mx.miek.nl."
|
||||
|
@ -71,7 +71,7 @@
|
|||
// use pattern for accessing the rdata of a TXT RR as the first RR in
|
||||
// the Answer section:
|
||||
//
|
||||
// if t, ok := in.Answer[0].(*RR_TXT); ok {
|
||||
// if t, ok := in.Answer[0].(*TXT); ok {
|
||||
// // do something with t.Txt
|
||||
// }
|
||||
package dns
|
||||
|
|
10
edns.go
10
edns.go
|
@ -4,7 +4,7 @@
|
|||
// standard RR type, the OPT RR, which is then completely abused.
|
||||
// Basic use pattern for creating an (empty) OPT RR:
|
||||
//
|
||||
// o := new(dns.RR_OPT)
|
||||
// o := new(dns.OPT)
|
||||
// o.Hdr.Name = "." // MUST be the root zone, per definition.
|
||||
// o.Hdr.Rrtype = dns.TypeOPT
|
||||
//
|
||||
|
@ -13,7 +13,7 @@
|
|||
// these options may be combined in an OPT RR.
|
||||
// Basic use pattern for a server to check if (and which) options are set:
|
||||
//
|
||||
// // o is a dns.RR_OPT
|
||||
// // o is a dns.OPT
|
||||
// for _, s := range o.Options {
|
||||
// switch e := s.(type) {
|
||||
// case *dns.EDNS0_NSID:
|
||||
|
@ -150,7 +150,7 @@ type EDNS0 interface {
|
|||
// The identifier is an opaque string encoded as hex.
|
||||
// Basic use pattern for creating an nsid option:
|
||||
//
|
||||
// o := new(dns.RR_OPT)
|
||||
// o := new(dns.OPT)
|
||||
// o.Hdr.Name = "."
|
||||
// o.Hdr.Rrtype = dns.TypeOPT
|
||||
// e := new(dns.EDNS0_NSID)
|
||||
|
@ -186,7 +186,7 @@ func (e *EDNS0_NSID) String() string {
|
|||
// answer depending on the location or network topology.
|
||||
// Basic use pattern for creating an subnet option:
|
||||
//
|
||||
// o := new(dns.RR_OPT)
|
||||
// o := new(dns.OPT)
|
||||
// o.Hdr.Name = "."
|
||||
// o.Hdr.Rrtype = dns.TypeOPT
|
||||
// e := new(dns.EDNS0_SUBNET)
|
||||
|
@ -286,7 +286,7 @@ func (e *EDNS0_SUBNET) String() (s string) {
|
|||
// up after themselves. This is a draft RFC and more information can be found at
|
||||
// http://files.dns-sd.org/draft-sekar-dns-ul.txt
|
||||
//
|
||||
// o := new(dns.RR_OPT)
|
||||
// o := new(dns.OPT)
|
||||
// o.Hdr.Name = "."
|
||||
// o.Hdr.Rrtype = dns.TypeOPT
|
||||
// e := new(dns.EDNS0_UPDATE_LEASE)
|
||||
|
|
|
@ -89,7 +89,7 @@ func (r *DNSKEY) Generate(bits int) (PrivateKey, error) {
|
|||
|
||||
// PrivateKeyString converts a PrivateKey to a string. This
|
||||
// string has the same format as the private-key-file of BIND9 (Private-key-format: v1.3).
|
||||
// It needs some info from the key (hashing, keytag), so its a method of the RR_DNSKEY.
|
||||
// It needs some info from the key (hashing, keytag), so its a method of the DNSKEY.
|
||||
func (r *DNSKEY) PrivateKeyString(p PrivateKey) (s string) {
|
||||
switch t := p.(type) {
|
||||
case *rsa.PrivateKey:
|
||||
|
|
Loading…
Reference in New Issue