Skip to content

Commit bcc389d

Browse files
author
Daniel
committed
Fixes gofmt -s diffs
1 parent 78d9d02 commit bcc389d

File tree

6 files changed

+29
-29
lines changed

6 files changed

+29
-29
lines changed

cmd/contact-exporter/main_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,13 @@ func TestFindContacts(t *testing.T) {
8383

8484
func exampleContacts() []contact {
8585
return []contact{
86-
contact{
86+
{
8787
ID: 1,
8888
},
89-
contact{
89+
{
9090
ID: 2,
9191
},
92-
contact{
92+
{
9393
ID: 3,
9494
},
9595
}

cmd/notify-mailer/main_test.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -304,27 +304,27 @@ type mockEmailResolver struct{}
304304
func (bs mockEmailResolver) SelectOne(output interface{}, _ string, args ...interface{}) error {
305305
// The "db" is just a list in memory
306306
db := []contactJSON{
307-
contactJSON{
307+
{
308308
ID: 1,
309309
Contact: []byte(`["mailto:example@example.com"]`),
310310
},
311-
contactJSON{
311+
{
312312
ID: 2,
313313
Contact: []byte(`["mailto:test-example-updated@example.com"]`),
314314
},
315-
contactJSON{
315+
{
316316
ID: 3,
317317
Contact: []byte(`["mailto:test-test-test@example.com"]`),
318318
},
319-
contactJSON{
319+
{
320320
ID: 4,
321321
Contact: []byte(`["mailto:example-example-example@example.com"]`),
322322
},
323-
contactJSON{
323+
{
324324
ID: 5,
325325
Contact: []byte(`["mailto:youve.got.mail@example.com"]`),
326326
},
327-
contactJSON{
327+
{
328328
ID: 6,
329329
Contact: []byte(`["mailto:mail@example.com"]`),
330330
},
@@ -367,18 +367,18 @@ func TestResolveEmails(t *testing.T) {
367367
// more test cases here you must also add the corresponding DB result in the
368368
// mock.
369369
regs := []regID{
370-
regID{
370+
{
371371
ID: 1,
372372
},
373-
regID{
373+
{
374374
ID: 2,
375375
},
376-
regID{
376+
{
377377
ID: 3,
378378
},
379379
// This registration ID deliberately doesn't exist in the mock data to make
380380
// sure this case is handled gracefully
381-
regID{
381+
{
382382
ID: 999,
383383
},
384384
}

grpc/creds/creds_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919

2020
func TestServerTransportCredentials(t *testing.T) {
2121
acceptedSANs := map[string]struct{}{
22-
"boulder-client": struct{}{},
22+
"boulder-client": {},
2323
}
2424
goodCert, err := core.LoadCert("../../test/grpc-creds/boulder-client/cert.pem")
2525
test.AssertNotError(t, err, "core.LoadCert('../../grpc-creds/boulder-client/cert.pem') failed")
@@ -62,7 +62,7 @@ func TestServerTransportCredentials(t *testing.T) {
6262
// that has a leaf certificate containing an IP address SAN present in the
6363
// accepted list.
6464
acceptedIPSans := map[string]struct{}{
65-
"127.0.0.1": struct{}{},
65+
"127.0.0.1": {},
6666
}
6767
bcreds = &serverTransportCredentials{servTLSConfig, acceptedIPSans}
6868
err = bcreds.validateClient(rightState)

revocation/reasons.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ var ReasonToString = map[Reason]string{
3838
// UserAllowedReasons contains the subset of Reasons which users are
3939
// allowed to use
4040
var UserAllowedReasons = map[Reason]struct{}{
41-
Unspecified: struct{}{}, // unspecified
42-
KeyCompromise: struct{}{}, // keyCompromise
43-
AffiliationChanged: struct{}{}, // affiliationChanged
44-
Superseded: struct{}{}, // superseded
45-
CessationOfOperation: struct{}{}, // cessationOfOperation
41+
Unspecified: {}, // unspecified
42+
KeyCompromise: {}, // keyCompromise
43+
AffiliationChanged: {}, // affiliationChanged
44+
Superseded: {}, // superseded
45+
CessationOfOperation: {}, // cessationOfOperation
4646
}

test/mail-test-srv/http_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func reqAndRecorder(t testing.TB, method, relativeUrl string, body io.Reader) (*
2323
func TestHTTPClear(t *testing.T) {
2424
srv := mailSrv{}
2525
w, r := reqAndRecorder(t, "POST", "/clear", nil)
26-
srv.allReceivedMail = []rcvdMail{rcvdMail{}}
26+
srv.allReceivedMail = []rcvdMail{{}}
2727
srv.httpClear(w, r)
2828
if w.Code != 200 {
2929
t.Errorf("expected 200, got %d", w.Code)
@@ -33,7 +33,7 @@ func TestHTTPClear(t *testing.T) {
3333
}
3434

3535
w, r = reqAndRecorder(t, "GET", "/clear", nil)
36-
srv.allReceivedMail = []rcvdMail{rcvdMail{}}
36+
srv.allReceivedMail = []rcvdMail{{}}
3737
srv.httpClear(w, r)
3838
if w.Code != 405 {
3939
t.Errorf("expected 405, got %d", w.Code)
@@ -46,11 +46,11 @@ func TestHTTPClear(t *testing.T) {
4646
func TestHTTPCount(t *testing.T) {
4747
srv := mailSrv{}
4848
srv.allReceivedMail = []rcvdMail{
49-
rcvdMail{From: "a", To: "b"},
50-
rcvdMail{From: "a", To: "b"},
51-
rcvdMail{From: "a", To: "c"},
52-
rcvdMail{From: "c", To: "a"},
53-
rcvdMail{From: "c", To: "b"},
49+
{From: "a", To: "b"},
50+
{From: "a", To: "b"},
51+
{From: "a", To: "c"},
52+
{From: "c", To: "a"},
53+
{From: "c", To: "b"},
5454
}
5555

5656
tests := []struct {

va/va_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -897,12 +897,12 @@ func TestParseResults(t *testing.T) {
897897
test.Assert(t, s == nil, "set is not nil")
898898
test.Assert(t, err == nil, "error is not nil")
899899
test.AssertNotError(t, err, "no error should be returned")
900-
r = []caaResult{{nil, errors.New("")}, {[]*dns.CAA{&dns.CAA{Value: "test"}}, nil}}
900+
r = []caaResult{{nil, errors.New("")}, {[]*dns.CAA{{Value: "test"}}, nil}}
901901
s, err = parseResults(r)
902902
test.Assert(t, s == nil, "set is not nil")
903903
test.AssertEquals(t, err.Error(), "")
904904
expected := dns.CAA{Value: "other-test"}
905-
r = []caaResult{{[]*dns.CAA{&expected}, nil}, {[]*dns.CAA{&dns.CAA{Value: "test"}}, nil}}
905+
r = []caaResult{{[]*dns.CAA{&expected}, nil}, {[]*dns.CAA{{Value: "test"}}, nil}}
906906
s, err = parseResults(r)
907907
test.AssertEquals(t, len(s.Unknown), 1)
908908
test.Assert(t, s.Unknown[0] == &expected, "Incorrect record returned")

0 commit comments

Comments
 (0)