Skip to content

Commit

Permalink
Fix golint errors in cmd/cloud-controller-manager/app/apis/config/v1a…
Browse files Browse the repository at this point in the history
…lpha1
  • Loading branch information
BraceCY committed Dec 3, 2019
1 parent 95a3cd5 commit ea845a7
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 5 deletions.
Expand Up @@ -29,7 +29,8 @@ func addDefaultingFuncs(scheme *runtime.Scheme) error {
return RegisterDefaults(scheme)
}

func SetDefaults_CloudControllerManagerConfiguration(obj *CloudControllerManagerConfiguration) {
// SetDefaultsCloudControllerManagerConfiguration use default CloudControllerManagerConfiguration options
func SetDefaultsCloudControllerManagerConfiguration(obj *CloudControllerManagerConfiguration) {
zero := metav1.Duration{}
if obj.NodeStatusUpdateFrequency == zero {
obj.NodeStatusUpdateFrequency = metav1.Duration{Duration: 5 * time.Minute}
Expand Down
Expand Up @@ -28,7 +28,7 @@ import (

func TestCloudControllerManagerDefaultsRoundTrip(t *testing.T) {
ks1 := &CloudControllerManagerConfiguration{}
SetDefaults_CloudControllerManagerConfiguration(ks1)
SetDefaultsCloudControllerManagerConfiguration(ks1)
cm, err := convertObjToConfigMap("CloudControllerManagerConfiguration", ks1)
if err != nil {
t.Errorf("unexpected ConvertObjToConfigMap error %v", err)
Expand Down
Expand Up @@ -25,7 +25,7 @@ import (
const GroupName = "cloudcontrollermanager.config.k8s.io"

var (
// GroupName is the group name use in this package
// SchemeGroupVersion is the group name use in this package
SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}
// SchemeBuilder is the scheme builder with scheme init functions to run for this API package
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
Expand Down
Expand Up @@ -23,6 +23,7 @@ import (

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// CloudControllerManagerConfiguration holds configuration for CloudControllerManager
type CloudControllerManagerConfiguration struct {
metav1.TypeMeta `json:",inline"`

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion hack/.golint_failures
@@ -1,5 +1,4 @@
# Apart from this line, only trailing comments are supported
cmd/cloud-controller-manager/app/apis/config/v1alpha1
cmd/kube-apiserver/app
cmd/kubeadm/app/apis/kubeadm/v1beta1
cmd/kubeadm/app/apis/kubeadm/v1beta2
Expand Down

0 comments on commit ea845a7

Please sign in to comment.