Skip to content

Commit 6d32808

Browse files
authored
[chore](cmd): fix gofumpt issues part 2 (#4810)
fix gofumpt issues in cmd/otel-allocator/internal --- This commit was automatically created by review-helper. Changes are split into focused commits grouped by directory to simplify the review process. Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
1 parent 46af008 commit 6d32808

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

cmd/otel-allocator/internal/allocation/strategy_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
)
1313

1414
func BenchmarkGetAllTargetsByCollectorAndJob(b *testing.B) {
15-
var table = []struct {
15+
table := []struct {
1616
numCollectors int
1717
numJobs int
1818
}{
@@ -47,7 +47,7 @@ func BenchmarkGetAllTargetsByCollectorAndJob(b *testing.B) {
4747
}
4848

4949
func Benchmark_Setting(b *testing.B) {
50-
var table = []struct {
50+
table := []struct {
5151
numCollectors int
5252
numTargets int
5353
}{

cmd/otel-allocator/internal/server/bench_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424

2525
func BenchmarkServerTargetsHandler(b *testing.B) {
2626
random := rand.New(rand.NewSource(time.Now().UnixNano()))
27-
var table = []struct {
27+
table := []struct {
2828
numCollectors int
2929
numJobs int
3030
}{

cmd/otel-allocator/internal/watcher/promOperator_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1529,7 +1529,8 @@ func getTestPrometheusCRWatcher(
15291529
Name: "labellednamespace",
15301530
Labels: map[string]string{
15311531
"label1": "label1",
1532-
}}})
1532+
},
1533+
}})
15331534

15341535
// create the shared informer and resync every 1s
15351536
nsMonInf := cache.NewSharedInformer(source, &v1.Namespace{}, 1*time.Second).(cache.SharedIndexInformer)

0 commit comments

Comments
 (0)