Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
miekg committed Mar 23, 2013
1 parent 6e72a14 commit 6a928b3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions lookup.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions unbound.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ import (
)

type Unbound struct {
ctx *C.struct_ctx
ctx *C.struct_ctx
version [3]int
}

Expand Down Expand Up @@ -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
}

Expand Down
6 changes: 3 additions & 3 deletions unbound_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package unbound

import (
"github.com/miekg/dns"
"fmt"
"github.com/miekg/dns"
"testing"
)

Expand Down Expand Up @@ -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
Expand All @@ -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()
}
Expand Down

0 comments on commit 6a928b3

Please sign in to comment.