Skip to content

Commit 6121f14

Browse files
committed
Code formatting (gofmt -s)
1 parent cc98756 commit 6121f14

4 files changed

+11
-11
lines changed

elasticsearch_benchmark_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ var defaultResponse = http.Response{
1818
Status: "200 OK",
1919
StatusCode: 200,
2020
ContentLength: 2,
21-
Header: http.Header(map[string][]string{"Content-Type": []string{"application/json"}}),
21+
Header: http.Header(map[string][]string{"Content-Type": {"application/json"}}),
2222
Body: ioutil.NopCloser(strings.NewReader(`{}`)),
2323
}
2424

elasticsearch_integration_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ func TestClientCustomTransport(t *testing.T) {
185185
t.Run("Manual", func(t *testing.T) {
186186
tr := estransport.New(estransport.Config{
187187
URLs: []*url.URL{
188-
&url.URL{Scheme: "http", Host: "localhost:9200"},
188+
{Scheme: "http", Host: "localhost:9200"},
189189
},
190190
Transport: http.DefaultTransport,
191191
})

estransport/estransport_integration_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ func TestTransportSelector(t *testing.T) {
4747
node string
4848
)
4949
transport := estransport.New(estransport.Config{URLs: []*url.URL{
50-
&url.URL{Scheme: "http", Host: "localhost:9200"},
51-
&url.URL{Scheme: "http", Host: "localhost:9201"},
50+
{Scheme: "http", Host: "localhost:9200"},
51+
{Scheme: "http", Host: "localhost:9201"},
5252
}})
5353

5454
node = NodeName(t, transport)

estransport/estransport_internal_test.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func TestTransport(t *testing.T) {
3939

4040
t.Run("Custom", func(t *testing.T) {
4141
tp := New(Config{
42-
URLs: []*url.URL{&url.URL{}},
42+
URLs: []*url.URL{{}},
4343
Transport: &mockTransp{
4444
RoundTripFunc: func(req *http.Request) (*http.Response, error) { return &http.Response{Status: "MOCK"}, nil },
4545
},
@@ -129,7 +129,7 @@ func TestTransportSelector(t *testing.T) {
129129
})
130130

131131
t.Run("Single URL", func(t *testing.T) {
132-
tp := New(Config{URLs: []*url.URL{&url.URL{Scheme: "http", Host: "localhost:9200"}}})
132+
tp := New(Config{URLs: []*url.URL{{Scheme: "http", Host: "localhost:9200"}}})
133133

134134
for i := 0; i < 7; i++ {
135135
u, err := tp.selector.Select()
@@ -147,8 +147,8 @@ func TestTransportSelector(t *testing.T) {
147147
var u *url.URL
148148

149149
tp := New(Config{URLs: []*url.URL{
150-
&url.URL{Scheme: "http", Host: "localhost:9200"},
151-
&url.URL{Scheme: "http", Host: "localhost:9201"},
150+
{Scheme: "http", Host: "localhost:9200"},
151+
{Scheme: "http", Host: "localhost:9201"},
152152
}})
153153

154154
u, _ = tp.selector.Select()
@@ -169,9 +169,9 @@ func TestTransportSelector(t *testing.T) {
169169

170170
t.Run("Three URLs", func(t *testing.T) {
171171
tp := New(Config{URLs: []*url.URL{
172-
&url.URL{Scheme: "http", Host: "localhost:9200"},
173-
&url.URL{Scheme: "http", Host: "localhost:9201"},
174-
&url.URL{Scheme: "http", Host: "localhost:9202"},
172+
{Scheme: "http", Host: "localhost:9200"},
173+
{Scheme: "http", Host: "localhost:9201"},
174+
{Scheme: "http", Host: "localhost:9202"},
175175
}})
176176

177177
var expected string

0 commit comments

Comments
 (0)