pkg/api: Fix golint errors

This commit is contained in:
Prasad Ghangal
2018-09-07 12:27:36 +05:30
parent 5c8ef7eb3b
commit 3fba36291c
11 changed files with 51 additions and 54 deletions

View File

@@ -31,11 +31,10 @@ import (
"k8s.io/kubernetes/pkg/api/legacyscheme"
)
// Based on: https://github.com/openshift/origin/blob/master/pkg/api/compatibility_test.go
//
// TestCompatibility reencodes the input using the codec for the given
// version and checks for the presence of the expected keys and absent
// keys in the resulting JSON.
// Based on: https://github.com/openshift/origin/blob/master/pkg/api/compatibility_test.go
func TestCompatibility(
t *testing.T,
version schema.GroupVersion,

View File

@@ -24,7 +24,7 @@ import (
"k8s.io/kubernetes/pkg/api/legacyscheme"
)
// TestSelectableFieldLabelConversions verifies that given resource have field
// TestSelectableFieldLabelConversionsOfKind verifies that given resource have field
// label conversion defined for each its selectable field.
// fields contains selectable fields of the resource.
// labelMap maps deprecated labels to their canonical names.

View File

@@ -88,6 +88,7 @@ func overrideGenericFuncs(codecs runtimeserializer.CodecFactory) []interface{} {
}
}
// FuzzerFuncs is a list of fuzzer functions
var FuzzerFuncs = fuzzer.MergeFuzzerFuncs(
genericfuzzer.Funcs,
overrideGenericFuncs,

View File

@@ -65,7 +65,7 @@ func fuzzInternalObject(t *testing.T, forVersion schema.GroupVersion, item runti
return item
}
func Convert_v1beta1_ReplicaSet_to_api_ReplicationController(in *v1beta1.ReplicaSet, out *api.ReplicationController, s conversion.Scope) error {
func ConvertV1beta1ReplicaSetToAPIReplicationController(in *v1beta1.ReplicaSet, out *api.ReplicationController, s conversion.Scope) error {
intermediate1 := &extensions.ReplicaSet{}
if err := k8s_v1beta1.Convert_v1beta1_ReplicaSet_To_extensions_ReplicaSet(in, intermediate1, s); err != nil {
return err
@@ -80,7 +80,7 @@ func Convert_v1beta1_ReplicaSet_to_api_ReplicationController(in *v1beta1.Replica
}
func TestSetControllerConversion(t *testing.T) {
if err := legacyscheme.Scheme.AddConversionFuncs(Convert_v1beta1_ReplicaSet_to_api_ReplicationController); err != nil {
if err := legacyscheme.Scheme.AddConversionFuncs(ConvertV1beta1ReplicaSetToAPIReplicationController); err != nil {
t.Fatal(err)
}