From 461143ec25df5770cea43994690ecf03a5ff8222 Mon Sep 17 00:00:00 2001 From: Humble Chirammal Date: Wed, 14 Sep 2022 08:26:30 +0530 Subject: [PATCH] update client package with go 1.19 formatting changes Signed-off-by: Humble Chirammal --- client/apis/volumesnapshot/v1/types.go | 20 +++++++++---------- client/clientset/versioned/fake/register.go | 14 ++++++------- client/clientset/versioned/scheme/register.go | 14 ++++++------- pkg/common-controller/snapshot_controller.go | 10 +++++----- 4 files changed, 29 insertions(+), 29 deletions(-) diff --git a/client/apis/volumesnapshot/v1/types.go b/client/apis/volumesnapshot/v1/types.go index 6490abaa..51ed543b 100644 --- a/client/apis/volumesnapshot/v1/types.go +++ b/client/apis/volumesnapshot/v1/types.go @@ -123,11 +123,11 @@ type VolumeSnapshotSource struct { // VolumeSnapshotStatus and VolumeSnapshotContentStatus. Fields in VolumeSnapshotStatus // are updated based on fields in VolumeSnapshotContentStatus. They are eventual // consistency. These fields are duplicate in both objects due to the following reasons: -// - Fields in VolumeSnapshotContentStatus can be used for filtering when importing a -// volumesnapshot. -// - VolumsnapshotStatus is used by end users because they cannot see VolumeSnapshotContent. -// - CSI snapshotter sidecar is light weight as it only watches VolumeSnapshotContent -// object, not VolumeSnapshot object. +// - Fields in VolumeSnapshotContentStatus can be used for filtering when importing a +// volumesnapshot. +// - VolumsnapshotStatus is used by end users because they cannot see VolumeSnapshotContent. +// - CSI snapshotter sidecar is light weight as it only watches VolumeSnapshotContent +// object, not VolumeSnapshot object. type VolumeSnapshotStatus struct { // boundVolumeSnapshotContentName is the name of the VolumeSnapshotContent // object to which this VolumeSnapshot object intends to bind to. @@ -361,11 +361,11 @@ type VolumeSnapshotContentSource struct { // VolumeSnapshotStatus and VolumeSnapshotContentStatus. Fields in VolumeSnapshotStatus // are updated based on fields in VolumeSnapshotContentStatus. They are eventual // consistency. These fields are duplicate in both objects due to the following reasons: -// - Fields in VolumeSnapshotContentStatus can be used for filtering when importing a -// volumesnapshot. -// - VolumsnapshotStatus is used by end users because they cannot see VolumeSnapshotContent. -// - CSI snapshotter sidecar is light weight as it only watches VolumeSnapshotContent -// object, not VolumeSnapshot object. +// - Fields in VolumeSnapshotContentStatus can be used for filtering when importing a +// volumesnapshot. +// - VolumsnapshotStatus is used by end users because they cannot see VolumeSnapshotContent. +// - CSI snapshotter sidecar is light weight as it only watches VolumeSnapshotContent +// object, not VolumeSnapshot object. type VolumeSnapshotContentStatus struct { // snapshotHandle is the CSI "snapshot_id" of a snapshot on the underlying storage system. // If not specified, it indicates that dynamic snapshot creation has either failed diff --git a/client/clientset/versioned/fake/register.go b/client/clientset/versioned/fake/register.go index 489359ce..5ae20f22 100644 --- a/client/clientset/versioned/fake/register.go +++ b/client/clientset/versioned/fake/register.go @@ -37,14 +37,14 @@ var localSchemeBuilder = runtime.SchemeBuilder{ // AddToScheme adds all types of this clientset into the given scheme. This allows composition // of clientsets, like in: // -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) // -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) // // After this, RawExtensions in Kubernetes types will serialize kube-aggregator types // correctly. diff --git a/client/clientset/versioned/scheme/register.go b/client/clientset/versioned/scheme/register.go index 60f4addd..df04449f 100644 --- a/client/clientset/versioned/scheme/register.go +++ b/client/clientset/versioned/scheme/register.go @@ -37,14 +37,14 @@ var localSchemeBuilder = runtime.SchemeBuilder{ // AddToScheme adds all types of this clientset into the given scheme. This allows composition // of clientsets, like in: // -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) // -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) // // After this, RawExtensions in Kubernetes types will serialize kube-aggregator types // correctly. diff --git a/pkg/common-controller/snapshot_controller.go b/pkg/common-controller/snapshot_controller.go index fb466197..6ea2b8e1 100644 --- a/pkg/common-controller/snapshot_controller.go +++ b/pkg/common-controller/snapshot_controller.go @@ -783,11 +783,11 @@ func (ctrl *csiSnapshotCommonController) storeContentUpdate(content interface{}) // the status has actually changed from the version saved in API server. // Parameters: // -// * snapshot - snapshot to update -// * setReadyToFalse bool - indicates whether to set the snapshot's ReadyToUse status to false. -// if true, ReadyToUse will be set to false; -// otherwise, ReadyToUse will not be changed. -// * eventtype, reason, message - event to send, see EventRecorder.Event() +// - snapshot - snapshot to update +// - setReadyToFalse bool - indicates whether to set the snapshot's ReadyToUse status to false. +// if true, ReadyToUse will be set to false; +// otherwise, ReadyToUse will not be changed. +// - eventtype, reason, message - event to send, see EventRecorder.Event() func (ctrl *csiSnapshotCommonController) updateSnapshotErrorStatusWithEvent(snapshot *crdv1.VolumeSnapshot, setReadyToFalse bool, eventtype, reason, message string) error { klog.V(5).Infof("updateSnapshotErrorStatusWithEvent[%s]", utils.SnapshotKey(snapshot))