Permalink
Browse files

fmt

  • Loading branch information...
1 parent 6e72a14 commit 6a928b34f3b16053fabf58fd202f537b5be0722c @miekg committed Mar 23, 2013
Showing with 9 additions and 9 deletions.
  1. +1 −1 dns.go
  2. +2 −2 lookup.go
  3. +3 −3 unbound.go
  4. +3 −3 unbound_test.go
View
2 dns.go
@@ -31,7 +31,7 @@ func (s byPriorityWeight) Less(i, j int) bool {
}
// shuffleByWeight shuffles SRV records by weight using the algorithm
-// described in RFC 2782.
+// described in RFC 2782.
func (addrs byPriorityWeight) shuffleByWeight() {
sum := 0
for _, addr := range addrs {
View
@@ -9,7 +9,7 @@ import (
// They are adapted to the package unbound and the package dns.
// LookupAddr performs a reverse lookup for the given address, returning a
-// list of names mapping to that address.
+// list of names mapping to that address.
func (u *Unbound) LookupAddr(addr string) (name []string, err error) {
reverse, err := dns.ReverseAddr(addr)
if err != nil {
@@ -95,7 +95,7 @@ func (u *Unbound) LookupMX(name string) (mx []*dns.MX, err error) {
// LookupSRV tries to resolve an SRV query of the given service, protocol,
// and domain name. The proto is "tcp" or "udp". The returned records are
// sorted by priority and randomized by weight within a priority.
-//
+//
// LookupSRV constructs the DNS name to look up following RFC 2782. That
// is, it looks up _service._proto.name. To accommodate services publishing
// SRV records under non-standard names, if both service and proto are
View
@@ -63,7 +63,7 @@ import (
)
type Unbound struct {
- ctx *C.struct_ctx
+ ctx *C.struct_ctx
version [3]int
}
@@ -273,8 +273,8 @@ func (u *Unbound) Resolve(name string, rrtype, rrclass uint16) (*Result, error)
func (u *Unbound) ResolveAsync(name string, rrtype, rrclass uint16, c chan *ResultError) {
go func() {
r, e := u.Resolve(name, rrtype, rrclass)
- c <- &ResultError{r, e}
- }()
+ c <- &ResultError{r, e}
+ }()
return
}
View
@@ -1,8 +1,8 @@
package unbound
import (
- "github.com/miekg/dns"
"fmt"
+ "github.com/miekg/dns"
"testing"
)
@@ -78,7 +78,7 @@ func TestUnicodeLookupHost(t *testing.T) {
}
func TestUnicodeResolve(t *testing.T) {
- u := New()
+ u := New()
defer u.Destroy()
if err := u.ResolvConf("/etc/resolv.conf"); err != nil {
return
@@ -88,7 +88,7 @@ func TestUnicodeResolve(t *testing.T) {
t.Log("Failure to get the A for ☁→❄→☃→☀→☺→☂→☹→✝.ws.")
t.Fail()
}
- if ! r.HaveData {
+ if !r.HaveData {
t.Log("Failure to get the A for ☁→❄→☃→☀→☺→☂→☹→✝.ws.")
t.Fail()
}

0 comments on commit 6a928b3

Please sign in to comment.