Skip to content

Commit

Permalink
Gofmt and fix import ordering
Browse files Browse the repository at this point in the history
Order the third party imports below the standard ones - as is common
in Go code.
  • Loading branch information
miekg committed Jun 15, 2016
1 parent c74b042 commit fcc25e2
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 11 deletions.
3 changes: 2 additions & 1 deletion dns.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package unbound

import (
"github.com/miekg/dns"
"math/rand"
"sort"

"github.com/miekg/dns"
)

// AddTaRR calls AddTa, but allows to directly use an dns.RR.
Expand Down
3 changes: 2 additions & 1 deletion lookup.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package unbound

import (
"github.com/miekg/dns"
"net"

"github.com/miekg/dns"
)

// These are function are a re-implementation of the net.Lookup* ones
Expand Down
3 changes: 2 additions & 1 deletion tutorial1/example.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ package main

import (
"fmt"
"github.com/miekg/unbound"
"log"

"github.com/miekg/unbound"
)

func main() {
Expand Down
3 changes: 2 additions & 1 deletion tutorial2/example.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ package main

import (
"fmt"
"log"

"github.com/miekg/dns"
"github.com/miekg/unbound"
"log"
)

func main() {
Expand Down
3 changes: 2 additions & 1 deletion tutorial3/example.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ package main
import (
"flag"
"fmt"
"log"

"github.com/miekg/dns"
"github.com/miekg/unbound"
"log"
)

// Examine the result structure in detail
Expand Down
3 changes: 2 additions & 1 deletion tutorial4/example.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ package main

import (
"fmt"
"log"

"github.com/miekg/dns"
"github.com/miekg/unbound"
"log"
)

// This is called when resolution is completed.
Expand Down
3 changes: 2 additions & 1 deletion tutorial5/example.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ package main

import (
"fmt"
"log"

"github.com/miekg/dns"
"github.com/miekg/unbound"
"log"
)

func main() {
Expand Down
3 changes: 2 additions & 1 deletion tutorial6/example.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ package main

import (
"fmt"
"log"

"github.com/miekg/dns"
"github.com/miekg/unbound"
"log"
)

func main() {
Expand Down
3 changes: 2 additions & 1 deletion unbound.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,13 @@ import "C"

import (
"encoding/binary"
"github.com/miekg/dns"
"os"
"strconv"
"strings"
"time"
"unsafe"

"github.com/miekg/dns"
)

type Unbound struct {
Expand Down
5 changes: 3 additions & 2 deletions unbound_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ package unbound

import (
"fmt"
"github.com/miekg/dns"
"runtime"
"sync"
"testing"

"github.com/miekg/dns"
)

func ExampleLookupCNAME() {
Expand Down Expand Up @@ -111,7 +112,7 @@ func TestStress(t *testing.T) {
for i := 0; i < max; i++ {
go func() {
for i := 0; i < 100; i++ {
d := domains[int(dns.Id()) % l]
d := domains[int(dns.Id())%l]
r, err := u.Resolve(d, dns.TypeA, dns.ClassINET)
if err != nil {
t.Log("failure to resolve: " + d)
Expand Down

0 comments on commit fcc25e2

Please sign in to comment.