From dfd034079965f049193b807f7a6e8657b505820e Mon Sep 17 00:00:00 2001 From: Vladimir Kuznetsov Date: Mon, 5 Jun 2023 14:31:09 +0300 Subject: [PATCH] fix formatting after rebase --- pkg/cloud/cloud.go | 25 ++++++++++++------------- pkg/driver/controller.go | 2 +- pkg/driver/driver.go | 2 +- pkg/driver/node_windows.go | 2 +- pkg/driver/sanity_test.go | 2 +- pkg/resizefs/resizefs_windows_test.go | 2 +- tests/e2e/driver/ebs_csi_driver.go | 2 +- tests/e2e/testsuites/testsuites.go | 2 +- 8 files changed, 19 insertions(+), 20 deletions(-) diff --git a/pkg/cloud/cloud.go b/pkg/cloud/cloud.go index cb0dfd9f17..a26abeae20 100644 --- a/pkg/cloud/cloud.go +++ b/pkg/cloud/cloud.go @@ -19,8 +19,8 @@ package cloud import ( "context" "crypto/sha256" - "encoding/hex" "crypto/tls" + "encoding/hex" "errors" "fmt" "net/http" @@ -31,8 +31,8 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/aws/endpoints" "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/endpoints" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/ec2" @@ -261,14 +261,13 @@ var _ Cloud = &cloud{} // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // +// // Example sending a request using the AttachVolumeRequest method. +// req, resp := client.AttachVolumeRequest(params) // -// // Example sending a request using the AttachVolumeRequest method. -// req, resp := client.AttachVolumeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachVolume func AttachVolumeRequest(c *ec2.EC2, input *AttachVolumeInput) (req *request.Request, output *ec2.VolumeAttachment) { @@ -301,13 +300,13 @@ func AttachVolumeRequest(c *ec2.EC2, input *AttachVolumeInput) (req *request.Req // // If a volume has an AWS Marketplace product code: // -// * The volume can be attached only to a stopped instance. +// - The volume can be attached only to a stopped instance. // -// * AWS Marketplace product codes are copied from the volume to the instance. +// - AWS Marketplace product codes are copied from the volume to the instance. // -// * You must be subscribed to the product. +// - You must be subscribed to the product. // -// * The instance type and operating system of the instance must support +// - The instance type and operating system of the instance must support // the product. For example, you can't detach a volume from a Windows instance // and attach it to a Linux instance. // diff --git a/pkg/driver/controller.go b/pkg/driver/controller.go index ffd4d2eba5..11ef7c20fa 100644 --- a/pkg/driver/controller.go +++ b/pkg/driver/controller.go @@ -26,11 +26,11 @@ import ( "github.com/aws/aws-sdk-go/aws/arn" "github.com/awslabs/volume-modifier-for-k8s/pkg/rpc" - csi "github.com/container-storage-interface/spec/lib/go/csi" "github.com/c2devel/aws-ebs-csi-driver/pkg/cloud" "github.com/c2devel/aws-ebs-csi-driver/pkg/driver/internal" "github.com/c2devel/aws-ebs-csi-driver/pkg/util" "github.com/c2devel/aws-ebs-csi-driver/pkg/util/template" + csi "github.com/container-storage-interface/spec/lib/go/csi" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" "google.golang.org/protobuf/types/known/timestamppb" diff --git a/pkg/driver/driver.go b/pkg/driver/driver.go index 64cfec65e0..19b803ad19 100644 --- a/pkg/driver/driver.go +++ b/pkg/driver/driver.go @@ -22,8 +22,8 @@ import ( "net" "github.com/awslabs/volume-modifier-for-k8s/pkg/rpc" - csi "github.com/container-storage-interface/spec/lib/go/csi" "github.com/c2devel/aws-ebs-csi-driver/pkg/util" + csi "github.com/container-storage-interface/spec/lib/go/csi" "google.golang.org/grpc" "k8s.io/klog/v2" ) diff --git a/pkg/driver/node_windows.go b/pkg/driver/node_windows.go index c2353515fe..066524d875 100644 --- a/pkg/driver/node_windows.go +++ b/pkg/driver/node_windows.go @@ -25,9 +25,9 @@ import ( "strconv" "strings" + "github.com/c2devel/aws-ebs-csi-driver/pkg/mounter" diskapi "github.com/kubernetes-csi/csi-proxy/client/api/disk/v1" diskclient "github.com/kubernetes-csi/csi-proxy/client/groups/disk/v1" - "github.com/c2devel/aws-ebs-csi-driver/pkg/mounter" "k8s.io/klog/v2" ) diff --git a/pkg/driver/sanity_test.go b/pkg/driver/sanity_test.go index 593a47994d..b04f35f60d 100644 --- a/pkg/driver/sanity_test.go +++ b/pkg/driver/sanity_test.go @@ -13,10 +13,10 @@ import ( "time" "github.com/aws/aws-sdk-go/service/ec2" - "github.com/kubernetes-csi/csi-test/pkg/sanity" "github.com/c2devel/aws-ebs-csi-driver/pkg/cloud" "github.com/c2devel/aws-ebs-csi-driver/pkg/driver/internal" "github.com/c2devel/aws-ebs-csi-driver/pkg/util" + "github.com/kubernetes-csi/csi-test/pkg/sanity" "k8s.io/mount-utils" mount_utils "k8s.io/mount-utils" ) diff --git a/pkg/resizefs/resizefs_windows_test.go b/pkg/resizefs/resizefs_windows_test.go index 916a5eac55..a82db26b59 100644 --- a/pkg/resizefs/resizefs_windows_test.go +++ b/pkg/resizefs/resizefs_windows_test.go @@ -5,8 +5,8 @@ package resizefs import ( "errors" - "github.com/golang/mock/gomock" "github.com/c2devel/aws-ebs-csi-driver/pkg/mounter" + "github.com/golang/mock/gomock" "testing" ) diff --git a/tests/e2e/driver/ebs_csi_driver.go b/tests/e2e/driver/ebs_csi_driver.go index 5fc32001d8..137b05db10 100644 --- a/tests/e2e/driver/ebs_csi_driver.go +++ b/tests/e2e/driver/ebs_csi_driver.go @@ -17,8 +17,8 @@ package driver import ( "fmt" - volumesnapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v4/apis/volumesnapshot/v1" ebscsidriver "github.com/c2devel/aws-ebs-csi-driver/pkg/driver" + volumesnapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v4/apis/volumesnapshot/v1" v1 "k8s.io/api/core/v1" storagev1 "k8s.io/api/storage/v1" "k8s.io/apimachinery/pkg/api/resource" diff --git a/tests/e2e/testsuites/testsuites.go b/tests/e2e/testsuites/testsuites.go index 71ad72478c..8ecf023064 100644 --- a/tests/e2e/testsuites/testsuites.go +++ b/tests/e2e/testsuites/testsuites.go @@ -22,9 +22,9 @@ import ( "github.com/aws/aws-sdk-go/aws" + awscloud "github.com/c2devel/aws-ebs-csi-driver/pkg/cloud" volumesnapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v4/apis/volumesnapshot/v1" snapshotclientset "github.com/kubernetes-csi/external-snapshotter/client/v4/clientset/versioned" - awscloud "github.com/c2devel/aws-ebs-csi-driver/pkg/cloud" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" apps "k8s.io/api/apps/v1"