Skip to content

Commit bc5f8b1

Browse files
committed
CLEANUP/MINOR: gofumpt: gofumpt the codebase
1 parent f4c0b98 commit bc5f8b1

File tree

9 files changed

+20
-16
lines changed

9 files changed

+20
-16
lines changed

.aspell.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ allowed:
2727
- cli
2828
- clickhouse
2929
- cnt
30+
- codebase
3031
- composable
3132
- conf
3233
- config
@@ -68,6 +69,7 @@ allowed:
6869
- github
6970
- gitlab
7071
- godaddy
72+
- gofumpt
7173
- gokc
7274
- golang
7375
- golangci

config-parser/tests/configs/parser_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ func TestGeneratedConfig(t *testing.T) {
102102
for _, configLine := range configTests {
103103
count := strings.Count(result, configLine.Line)
104104
if count != configLine.Count {
105-
_ = os.WriteFile("/tmp/HAGEN.cfg", []byte(result), 0644)
105+
_ = os.WriteFile("/tmp/HAGEN.cfg", []byte(result), 0o644)
106106
t.Fatalf("line '%s' found %d times, expected %d times", configLine.Line, count, configLine.Count)
107107
}
108108
}

runtime/crl_files_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ Status: Used
280280
}
281281
if !reflect.DeepEqual(got, tt.want) {
282282
t.Error("SingleRuntime.ShowCrlFile(): ", cmp.Diff(got, tt.want))
283-
//t.Errorf("SingleRuntime.ShowCrlFile() = %v, want %v", got, tt.want)
283+
// t.Errorf("SingleRuntime.ShowCrlFile() = %v, want %v", got, tt.want)
284284
}
285285
})
286286
}

runtime/crt_lists.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@ import (
1010
)
1111

1212
// These type aliases are provided for backward compatibility.
13-
type CrtListEntry = models.SslCrtListEntry //nolint:gofumpt
14-
type CrtListEntries = models.SslCrtListEntries
15-
type CrtList = models.SslCrtList
16-
type CrtLists = models.SslCrtLists
13+
type (
14+
CrtListEntry = models.SslCrtListEntry //nolint:gofumpt
15+
CrtListEntries = models.SslCrtListEntries
16+
CrtList = models.SslCrtList
17+
CrtLists = models.SslCrtLists
18+
)
1719

1820
// ShowCrtLists returns CrtList files description from runtime
1921
func (s *SingleRuntime) ShowCrtLists() (models.SslCrtLists, error) {

test/structured_backend_test.go

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,8 @@ func TestCreateEditDeleteStructuredBackend(t *testing.T) {
396396
Enabled: misc.StringP("enabled"),
397397
Except: "127.0.0.1",
398398
},
399-
}},
399+
},
400+
},
400401
{
401402
BackendBase: models.BackendBase{
402403
Name: "created",
@@ -464,7 +465,8 @@ func TestCreateEditDeleteStructuredBackend(t *testing.T) {
464465
{Cond: misc.StringP("if"), CondTest: misc.StringP("host_www")},
465466
{Cond: misc.StringP("unless"), CondTest: misc.StringP("missing_cl")},
466467
},
467-
}},
468+
},
469+
},
468470
}
469471

470472
for _, bck := range backends {
@@ -553,7 +555,8 @@ func TestCreateEditDeleteStructuredBackendHTTPConnectionMode(t *testing.T) {
553555
},
554556
},
555557
HTTPConnectionMode: "httpclose",
556-
}},
558+
},
559+
},
557560
expectedHTTPConnectionMode: "httpclose",
558561
},
559562
{
@@ -569,7 +572,8 @@ func TestCreateEditDeleteStructuredBackendHTTPConnectionMode(t *testing.T) {
569572
},
570573
},
571574
HTTPConnectionMode: "http-keep-alive",
572-
}},
575+
},
576+
},
573577
expectedHTTPConnectionMode: "http-keep-alive",
574578
},
575579
{
@@ -585,7 +589,8 @@ func TestCreateEditDeleteStructuredBackendHTTPConnectionMode(t *testing.T) {
585589
},
586590
},
587591
HTTPConnectionMode: "",
588-
}},
592+
},
593+
},
589594
expectedHTTPConnectionMode: "",
590595
},
591596
}

test/structured_global_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,4 @@ func TestPutStructuredGlobal(t *testing.T) {
7272

7373
err = clientTest.PushStructuredGlobalConfiguration(g, "", 55)
7474
require.Error(t, err, "Should have returned version conflict.")
75-
7675
}

test/structured_log_forward_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ func TestGetStructuredLogForward(t *testing.T) {
8383

8484
_, _, err = clientTest.GetStructuredLogForward("doesnotexist", "")
8585
require.Error(t, err, "should throw error, non existent log forwards section")
86-
8786
}
8887

8988
func TestCreateEditDeleteStructuredLogForward(t *testing.T) {
@@ -154,5 +153,4 @@ func TestCreateEditDeleteStructuredLogForward(t *testing.T) {
154153

155154
err = clientTest.DeleteLogForward("doesnotexist", "", version)
156155
require.Error(t, err, "should throw error, non existent log forward")
157-
158156
}

test/structured_traces_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,5 +68,4 @@ func TestPutStructuredTraces(t *testing.T) {
6868

6969
err = clientTest.PushStructuredTraces(traces, "", 55)
7070
require.Error(err, "Should have returned version conflict.")
71-
7271
}

test/traces_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ func checkTraces(t *testing.T, traces *models.Traces) {
5050
}
5151

5252
func TestCreateEditDeleteTraces(t *testing.T) {
53-
5453
// We cannot start by creating a new traces section, since there is
5554
// already one present in $testConf, and this is a unique section.
5655
// So let's delete first.

0 commit comments

Comments
 (0)