diff --git a/client_test.go b/client_test.go index 236b2e72..7a70044f 100644 --- a/client_test.go +++ b/client_test.go @@ -161,8 +161,8 @@ func TestClientEDNS0Local(t *testing.T) { } } -// Example_updateLeaseTSIG shows how to update a lease signed with TSIG. -func Example_updateLeaseTSIG() { +// ExampleTsigSecret_updateLeaseTSIG shows how to update a lease signed with TSIG. +func ExampleTsigSecret_updateLeaseTSIG() { m := new(Msg) m.SetUpdate("t.local.ip6.io.") rr, _ := NewRR("t.local.ip6.io. 30 A 127.0.0.1") diff --git a/example_test.go b/example_test.go index 00d66444..39d92a3c 100644 --- a/example_test.go +++ b/example_test.go @@ -3,9 +3,10 @@ package dns_test import ( "errors" "fmt" - "github.com/miekg/dns" "log" "net" + + "github.com/miekg/dns" ) // Retrieve the MX records for miek.nl. @@ -31,11 +32,11 @@ func ExampleMX() { // Retrieve the DNSKEY records of a zone and convert them // to DS records for SHA1, SHA256 and SHA384. -func ExampleDNSKEY() { +func ExampleDS() { config, _ := dns.ClientConfigFromFile("/etc/resolv.conf") c := new(dns.Client) m := new(dns.Msg) - zone := "miek.nl" + zone = "miek.nl" m.SetQuestion(dns.Fqdn(zone), dns.TypeDNSKEY) m.SetEdns0(4096, true) r, _, err := c.Exchange(m, config.Servers[0]+":"+config.Port) diff --git a/parse_test.go b/parse_test.go index 08f200a7..f2922e0b 100644 --- a/parse_test.go +++ b/parse_test.go @@ -633,7 +633,7 @@ moutamassey NS ns01.yahoodomains.jp. // moutamassey.0-g.name.name. 10800 IN NS ns02.yahoodomains.jp. } -func ExampleNewRR_hip() { +func ExampleHIP() { h := `www.example.com IN HIP ( 2 200100107B1A74DF365639CC39F1D578 AwEAAbdxyhNuSutc5EMzxTs9LBPCIkOFH8cIvM4p 9+LrV4e19WzK00+CI6zBCQTdtWsuxKbWIy87UOoJTwkUs7lBu+Upr1gsNrut79ryra+bSRGQ @@ -684,7 +684,7 @@ b1slImA8YVJyuIDsj7kwzG7jnERNqnWxZ48AWkskmdHaVDP4BcelrTI3rMXdXF5D } } -func ExampleNewRR_soa() { +func ExampleSOA() { s := "example.com. 1000 SOA master.example.com. admin.example.com. 1 4294967294 4294967293 4294967295 100" if soa, err := NewRR(s); err == nil { fmt.Println(soa.String())