Skip to content

Commit 27bc0d6

Browse files
MKrupauskasjeffbean
authored andcommitted
run go fmt
1 parent 3504d3a commit 27bc0d6

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

dnshostprovider.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package zk
22

33
import (
4-
"fmt"
54
"context"
5+
"fmt"
66
"net"
77
"sync"
88
"time"
@@ -37,12 +37,12 @@ func (o lookupTimeoutOption) apply(provider *DNSHostProvider) {
3737
// the call to Init. It could be easily extended to re-query DNS
3838
// periodically or if there is trouble connecting.
3939
type DNSHostProvider struct {
40-
mu sync.Mutex // Protects everything, so we can add asynchronous updates later.
41-
servers []string
42-
curr int
43-
last int
40+
mu sync.Mutex // Protects everything, so we can add asynchronous updates later.
41+
servers []string
42+
curr int
43+
last int
4444
lookupTimeout time.Duration
45-
lookupHost lookupHostFn // Override of net.LookupHost, for testing.
45+
lookupHost lookupHostFn // Override of net.LookupHost, for testing.
4646
}
4747

4848
// NewDNSHostProvider creates a new DNSHostProvider with the given options.

dnshostprovider_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func TestIntegration_DNSHostProviderCreate(t *testing.T) {
3434
port := ts.Servers[0].Port
3535
server := fmt.Sprintf("foo.example.com:%d", port)
3636
hostProvider := NewDNSHostProvider(
37-
withLookupHost(func (ctx context.Context, host string) ([]string, error) {
37+
withLookupHost(func(ctx context.Context, host string) ([]string, error) {
3838
if _, ok := ctx.Deadline(); !ok {
3939
t.Fatal("No lookup context deadline set")
4040
}
@@ -245,7 +245,7 @@ func TestDNSHostProviderRetryStart(t *testing.T) {
245245
}
246246

247247
func TestNewDNSHostProvider(t *testing.T) {
248-
want := 5*time.Second
248+
want := 5 * time.Second
249249
provider := NewDNSHostProvider(WithLookupTimeout(want))
250250
if provider.lookupTimeout != want {
251251
t.Fatalf("expected lookup timeout to be %v, got %v", want, provider.lookupTimeout)

0 commit comments

Comments
 (0)