Skip to content

Commit 5a677b4

Browse files
Remove TypeMeta initializations
1 parent e03cde6 commit 5a677b4

File tree

3 files changed

+1
-17
lines changed

3 files changed

+1
-17
lines changed

internal/scorecard/helpers/helpers.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ import (
1818
"fmt"
1919

2020
scapiv1alpha1 "github.com/operator-framework/operator-sdk/pkg/apis/scorecard/v1alpha1"
21-
22-
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2321
)
2422

2523
// These functions should be in the public test definitions file, but they are not complete/stable,
@@ -91,10 +89,6 @@ func CalculateResult(tests []scapiv1alpha1.ScorecardTestResult) scapiv1alpha1.Sc
9189
// provided suites and log
9290
func TestSuitesToScorecardOutput(suites []TestSuite, log string) scapiv1alpha1.ScorecardOutput {
9391
test := scapiv1alpha1.ScorecardOutput{
94-
TypeMeta: metav1.TypeMeta{
95-
Kind: "ScorecardOutput",
96-
APIVersion: "osdk.openshift.io/v1alpha1",
97-
},
9892
Log: log,
9993
}
10094
scorecardSuiteResults := []scapiv1alpha1.ScorecardSuiteResult{}

pkg/apis/scorecard/v1v2conversions.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,11 @@ package scorecard
1717
import (
1818
scapiv1alpha1 "github.com/operator-framework/operator-sdk/pkg/apis/scorecard/v1alpha1"
1919
scapiv1alpha2 "github.com/operator-framework/operator-sdk/pkg/apis/scorecard/v1alpha2"
20-
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2120
)
2221

2322
func ConvertScorecardOutputV1ToV2(v1ScorecardOutput scapiv1alpha1.ScorecardOutput) scapiv1alpha2.ScorecardOutput {
2423

25-
output := scapiv1alpha2.ScorecardOutput{
26-
TypeMeta: metav1.TypeMeta{
27-
Kind: "ScorecardOutput",
28-
APIVersion: "osdk.openshift.io/v1alpha2",
29-
},
30-
}
24+
output := scapiv1alpha2.ScorecardOutput{}
3125

3226
// convert v1 suite into v2 test results
3327
output.Results = make([]scapiv1alpha2.ScorecardTestResult, 0)

test/test-framework/pkg/controller/memcached/memcached_controller.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,6 @@ func (r *ReconcileMemcached) deploymentForMemcached(m *cachev1alpha1.Memcached)
180180
replicas := m.Spec.Size
181181

182182
dep := &appsv1.Deployment{
183-
TypeMeta: metav1.TypeMeta{
184-
APIVersion: "apps/v1",
185-
Kind: "Deployment",
186-
},
187183
ObjectMeta: metav1.ObjectMeta{
188184
Name: m.Name,
189185
Namespace: m.Namespace,

0 commit comments

Comments
 (0)