Skip to content

Commit 01b08d6

Browse files
committed
cleanup: fix golint errors
1 parent 47d9402 commit 01b08d6

File tree

9 files changed

+40
-40
lines changed

9 files changed

+40
-40
lines changed

.github/workflows/static.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ jobs:
1515
- name: Run linter
1616
uses: golangci/golangci-lint-action@v6
1717
with:
18-
version: v1.54
18+
version: v1.60
1919
args: -E=gofmt,unused,ineffassign,revive,misspell,exportloopref,asciicheck,bodyclose,depguard,dogsled,durationcheck,errname,forbidigo -D=staticcheck --timeout=30m0s

pkg/blob/blob.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ func NewDriver(options *DriverOptions, kubeClient kubernetes.Interface, cloud *p
291291
}
292292

293293
var err error
294-
getter := func(key string) (interface{}, error) { return nil, nil }
294+
getter := func(_ string) (interface{}, error) { return nil, nil }
295295
if d.accountSearchCache, err = azcache.NewTimedCache(time.Minute, getter, false); err != nil {
296296
klog.Fatalf("%v", err)
297297
}

pkg/blob/controllerserver.go

+11-11
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ func (d *Driver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest)
207207
// only do validations here, used in NodeStageVolume, NodePublishVolume
208208
if v != "" {
209209
if _, err := strconv.ParseUint(v, 8, 32); err != nil {
210-
return nil, status.Errorf(codes.InvalidArgument, fmt.Sprintf("invalid mountPermissions %s in storage class", v))
210+
return nil, status.Errorf(codes.InvalidArgument, "invalid mountPermissions %s in storage class", v)
211211
}
212212
}
213213
case useDataPlaneAPIField:
@@ -217,7 +217,7 @@ func (d *Driver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest)
217217
case tagValueDelimiterField:
218218
tagValueDelimiter = v
219219
default:
220-
return nil, status.Errorf(codes.InvalidArgument, fmt.Sprintf("invalid parameter %q in storage class", k))
220+
return nil, status.Errorf(codes.InvalidArgument, "invalid parameter %q in storage class", k)
221221
}
222222
}
223223

@@ -232,7 +232,7 @@ func (d *Driver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest)
232232
}
233233

234234
if matchTags && account != "" {
235-
return nil, status.Errorf(codes.InvalidArgument, fmt.Sprintf("matchTags must set as false when storageAccount(%s) is provided", account))
235+
return nil, status.Errorf(codes.InvalidArgument, "matchTags must set as false when storageAccount(%s) is provided", account)
236236
}
237237

238238
if resourceGroup == "" {
@@ -292,13 +292,13 @@ func (d *Driver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest)
292292
if IsAzureStackCloud(d.cloud) {
293293
accountKind = string(armstorage.KindStorage)
294294
if storageAccountType != "" && storageAccountType != string(armstorage.SKUNameStandardLRS) && storageAccountType != string(armstorage.SKUNamePremiumLRS) {
295-
return nil, status.Errorf(codes.InvalidArgument, fmt.Sprintf("Invalid skuName value: %s, as Azure Stack only supports %s and %s Storage Account types.", storageAccountType, storage.SkuNamePremiumLRS, storage.SkuNameStandardLRS))
295+
return nil, status.Errorf(codes.InvalidArgument, "Invalid skuName value: %s, as Azure Stack only supports %s and %s Storage Account types.", storageAccountType, storage.SkuNamePremiumLRS, storage.SkuNameStandardLRS)
296296
}
297297
}
298298

299299
tags, err := util.ConvertTagsToMap(customTags, tagValueDelimiter)
300300
if err != nil {
301-
return nil, status.Errorf(codes.InvalidArgument, err.Error())
301+
return nil, status.Errorf(codes.InvalidArgument, "%v", err)
302302
}
303303

304304
if strings.TrimSpace(storageEndpointSuffix) == "" {
@@ -386,7 +386,7 @@ func (d *Driver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest)
386386
// search in cache first
387387
cache, err := d.accountSearchCache.Get(lockKey, azcache.CacheReadTypeDefault)
388388
if err != nil {
389-
return nil, status.Errorf(codes.Internal, err.Error())
389+
return nil, status.Errorf(codes.Internal, "%v", err)
390390
}
391391
if cache != nil {
392392
accountName = cache.(string)
@@ -868,7 +868,7 @@ func (d *Driver) authorizeAzcopyWithIdentity() ([]string, error) {
868868
authAzcopyEnv = append(authAzcopyEnv, fmt.Sprintf("%s=%s", azcopySPAApplicationID, azureAuthConfig.AADClientID))
869869
authAzcopyEnv = append(authAzcopyEnv, fmt.Sprintf("%s=%s", azcopySPAClientSecret, azureAuthConfig.AADClientSecret))
870870
authAzcopyEnv = append(authAzcopyEnv, fmt.Sprintf("%s=%s", azcopyTenantID, azureAuthConfig.TenantID))
871-
klog.V(2).Infof(fmt.Sprintf("set AZCOPY_SPA_APPLICATION_ID=%s, AZCOPY_TENANT_ID=%s successfully", azureAuthConfig.AADClientID, azureAuthConfig.TenantID))
871+
klog.V(2).Infof("set AZCOPY_SPA_APPLICATION_ID=%s, AZCOPY_TENANT_ID=%s successfully", azureAuthConfig.AADClientID, azureAuthConfig.TenantID)
872872

873873
return authAzcopyEnv, nil
874874
}
@@ -924,10 +924,10 @@ func isValidVolumeCapabilities(volCaps []*csi.VolumeCapability) error {
924924
func parseDays(dayStr string) (int32, error) {
925925
days, err := strconv.Atoi(dayStr)
926926
if err != nil {
927-
return 0, status.Errorf(codes.InvalidArgument, fmt.Sprintf("invalid %s:%s in storage class", softDeleteBlobsField, dayStr))
927+
return 0, status.Errorf(codes.InvalidArgument, "invalid %s:%s in storage class", softDeleteBlobsField, dayStr)
928928
}
929929
if days <= 0 || days > 365 {
930-
return 0, status.Errorf(codes.InvalidArgument, fmt.Sprintf("invalid %s:%s in storage class, should be in range [1, 365]", softDeleteBlobsField, dayStr))
930+
return 0, status.Errorf(codes.InvalidArgument, "invalid %s:%s in storage class, should be in range [1, 365]", softDeleteBlobsField, dayStr)
931931
}
932932

933933
return int32(days), nil
@@ -947,13 +947,13 @@ func (d *Driver) generateSASToken(accountName, accountKey, storageEndpointSuffix
947947

948948
credential, err := azblob.NewSharedKeyCredential(accountName, accountKey)
949949
if err != nil {
950-
return "", status.Errorf(codes.Internal, fmt.Sprintf("failed to generate sas token in creating new shared key credential, accountName: %s, err: %s", accountName, err.Error()))
950+
return "", status.Errorf(codes.Internal, "failed to generate sas token in creating new shared key credential, accountName: %s, err: %v", accountName, err)
951951
}
952952
clientOptions := service.ClientOptions{}
953953
clientOptions.InsecureAllowCredentialWithHTTP = true
954954
serviceClient, err := service.NewClientWithSharedKeyCredential(fmt.Sprintf("https://%s.blob.%s/", accountName, storageEndpointSuffix), credential, &clientOptions)
955955
if err != nil {
956-
return "", status.Errorf(codes.Internal, fmt.Sprintf("failed to generate sas token in creating new client with shared key credential, accountName: %s, err: %s", accountName, err.Error()))
956+
return "", status.Errorf(codes.Internal, "failed to generate sas token in creating new client with shared key credential, accountName: %s, err: %v", accountName, err)
957957
}
958958
sasURL, err := serviceClient.GetSASURL(
959959
sas.AccountResourceTypes{Object: true, Service: false, Container: true},

pkg/blob/controllerserver_test.go

+13-13
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ func TestCreateVolume(t *testing.T) {
378378
controllerServiceCapability,
379379
}
380380

381-
expectedErr := status.Errorf(codes.InvalidArgument, fmt.Sprintf("invalid parameter %q in storage class", "invalidparameter"))
381+
expectedErr := status.Errorf(codes.InvalidArgument, "invalid parameter %q in storage class", "invalidparameter")
382382
_, err := d.CreateVolume(context.Background(), req)
383383
if !reflect.DeepEqual(err, expectedErr) {
384384
t.Errorf("Unexpected error: %v", err)
@@ -400,7 +400,7 @@ func TestCreateVolume(t *testing.T) {
400400
controllerServiceCapability,
401401
}
402402

403-
expectedErr := status.Errorf(codes.InvalidArgument, fmt.Sprintf("invalid %s %s in storage class", "mountPermissions", "0abc"))
403+
expectedErr := status.Errorf(codes.InvalidArgument, "invalid %s %s in storage class", "mountPermissions", "0abc")
404404
_, err := d.CreateVolume(context.Background(), req)
405405
if !reflect.DeepEqual(err, expectedErr) {
406406
t.Errorf("Unexpected error: %v", err)
@@ -496,7 +496,7 @@ func TestCreateVolume(t *testing.T) {
496496
controllerServiceCapability,
497497
}
498498

499-
expectedErr := status.Errorf(codes.InvalidArgument, fmt.Sprintf("Invalid skuName value: %s, as Azure Stack only supports %s and %s Storage Account types.", "unit-test", storage.SkuNamePremiumLRS, storage.SkuNameStandardLRS))
499+
expectedErr := status.Errorf(codes.InvalidArgument, "Invalid skuName value: %s, as Azure Stack only supports %s and %s Storage Account types.", "unit-test", storage.SkuNamePremiumLRS, storage.SkuNameStandardLRS)
500500
_, err := d.CreateVolume(context.Background(), req)
501501
if !reflect.DeepEqual(err, expectedErr) {
502502
t.Errorf("Unexpected error: %v", err)
@@ -1117,7 +1117,7 @@ func TestValidateVolumeCapabilities(t *testing.T) {
11171117
clientErr: DATAPLANE,
11181118
containerProp: &armstorage.ContainerProperties{},
11191119
expectedRes: nil,
1120-
expectedErr: status.Errorf(codes.Internal, fmt.Errorf(containerBeingDeletedDataplaneAPIError).Error()),
1120+
expectedErr: status.Errorf(codes.Internal, "%v", containerBeingDeletedDataplaneAPIError),
11211121
},
11221122
{
11231123
name: "Requested Volume does not exist",
@@ -1129,7 +1129,7 @@ func TestValidateVolumeCapabilities(t *testing.T) {
11291129
clientErr: NULL,
11301130
containerProp: &armstorage.ContainerProperties{},
11311131
expectedRes: nil,
1132-
expectedErr: status.Errorf(codes.NotFound, fmt.Sprintf("requested volume(%s) does not exist", "unit#test#test")),
1132+
expectedErr: status.Errorf(codes.NotFound, "requested volume(%s) does not exist", "unit#test#test"),
11331133
},
11341134
/*{ //Volume being shown as not existing. ContainerProperties.Deleted not setting correctly??
11351135
name: "Successful I/O",
@@ -1175,7 +1175,7 @@ func TestValidateVolumeCapabilities(t *testing.T) {
11751175
blobClientMock := mock_blobcontainerclient.NewMockInterface(ctrl)
11761176
clientFactoryMock.EXPECT().GetBlobContainerClientForSub(gomock.Any()).Return(blobClientMock, nil).AnyTimes()
11771177
blobClientMock.EXPECT().Get(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).DoAndReturn(
1178-
func(ctx context.Context, resourceGroupName string, parentResourceName string, resourceName string) (result *armstorage.BlobContainer, rerr error) {
1178+
func(_ context.Context, _ string, _ string, _ string) (result *armstorage.BlobContainer, _ error) {
11791179
switch test.clientErr {
11801180
case DATAPLANE:
11811181
return nil, fmt.Errorf(containerBeingDeletedDataplaneAPIError)
@@ -1415,15 +1415,15 @@ func TestCreateBlobContainer(t *testing.T) {
14151415
clientFactoryMock.EXPECT().GetBlobContainerClientForSub(gomock.Any()).Return(blobClientMock, nil).AnyTimes()
14161416
d.clientFactory = clientFactoryMock
14171417
blobClientMock.EXPECT().CreateContainer(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).DoAndReturn(
1418-
func(ctx context.Context, resourceGroupName, accountName, containerName string, parameters armstorage.BlobContainer) (*armstorage.BlobContainer, error) {
1418+
func(_ context.Context, _, _, _ string, _ armstorage.BlobContainer) (*armstorage.BlobContainer, error) {
14191419
if test.clientErr == DATAPLANE {
14201420
return nil, fmt.Errorf(containerBeingDeletedDataplaneAPIError)
14211421
}
14221422
if test.clientErr == MANAGEMENT {
14231423
return nil, fmt.Errorf(containerBeingDeletedManagementAPIError)
14241424
}
14251425
if test.clientErr == CUSTOM {
1426-
return nil, fmt.Errorf(test.customErrStr)
1426+
return nil, fmt.Errorf("%v", test.customErrStr)
14271427
}
14281428
return nil, nil
14291429
}).AnyTimes()
@@ -1505,15 +1505,15 @@ func TestDeleteBlobContainer(t *testing.T) {
15051505
clientFactoryMock.EXPECT().GetBlobContainerClientForSub(gomock.Any()).Return(blobClientMock, nil).AnyTimes()
15061506
d.clientFactory = clientFactoryMock
15071507
blobClientMock.EXPECT().DeleteContainer(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).DoAndReturn(
1508-
func(ctx context.Context, resourceGroupName, accountName, containerName string) error {
1508+
func(_ context.Context, _, _, _ string) error {
15091509
if test.clientErr == DATAPLANE {
15101510
return fmt.Errorf(containerBeingDeletedDataplaneAPIError)
15111511
}
15121512
if test.clientErr == MANAGEMENT {
15131513
return fmt.Errorf(containerBeingDeletedManagementAPIError)
15141514
}
15151515
if test.clientErr == CUSTOM {
1516-
return fmt.Errorf(test.customErrStr)
1516+
return fmt.Errorf("%v", test.customErrStr)
15171517
}
15181518
return nil
15191519
}).AnyTimes()
@@ -1851,7 +1851,7 @@ func TestGenerateSASToken(t *testing.T) {
18511851
accountName: "unit-test",
18521852
accountKey: "fakeValue",
18531853
want: "",
1854-
expectedErr: status.Errorf(codes.Internal, fmt.Sprintf("failed to generate sas token in creating new shared key credential, accountName: %s, err: %s", "unit-test", "decode account key: illegal base64 data at input byte 8")),
1854+
expectedErr: status.Errorf(codes.Internal, "failed to generate sas token in creating new shared key credential, accountName: %s, err: %s", "unit-test", "decode account key: illegal base64 data at input byte 8"),
18551855
},
18561856
}
18571857
for _, tt := range tests {
@@ -2066,7 +2066,7 @@ func TestGetAzcopyAuth(t *testing.T) {
20662066
}
20672067

20682068
expectedAccountSASToken := ""
2069-
expectedErr := status.Errorf(codes.Internal, fmt.Sprintf("failed to generate sas token in creating new shared key credential, accountName: %s, err: %s", "accountName", "decode account key: illegal base64 data at input byte 8"))
2069+
expectedErr := status.Errorf(codes.Internal, "failed to generate sas token in creating new shared key credential, accountName: %s, err: %s", "accountName", "decode account key: illegal base64 data at input byte 8")
20702070
accountSASToken, _, err := d.getAzcopyAuth(context.Background(), "accountName", "", "core.windows.net", &azure.AccountOptions{}, secrets, "secretsName", "secretsNamespace", false)
20712071
if !reflect.DeepEqual(err, expectedErr) || !reflect.DeepEqual(accountSASToken, expectedAccountSASToken) {
20722072
t.Errorf("Unexpected accountSASToken: %s, Unexpected error: %v", accountSASToken, err)
@@ -2087,7 +2087,7 @@ func TestGetAzcopyAuth(t *testing.T) {
20872087

20882088
ctx := context.Background()
20892089
expectedAccountSASToken := ""
2090-
expectedErr := status.Errorf(codes.Internal, fmt.Sprintf("failed to generate sas token in creating new shared key credential, accountName: %s, err: %s", "accountName", "decode account key: illegal base64 data at input byte 8"))
2090+
expectedErr := status.Errorf(codes.Internal, "failed to generate sas token in creating new shared key credential, accountName: %s, err: %s", "accountName", "decode account key: illegal base64 data at input byte 8")
20912091
accountSASToken, _, err := d.getAzcopyAuth(ctx, "accountName", "", "core.windows.net", &azure.AccountOptions{}, secrets, "secretsName", "secretsNamespace", false)
20922092
if !reflect.DeepEqual(err, expectedErr) || !reflect.DeepEqual(accountSASToken, expectedAccountSASToken) {
20932093
t.Errorf("Unexpected accountSASToken: %s, Unexpected error: %v", accountSASToken, err)

pkg/blob/nodeserver.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ func (d *Driver) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolu
112112
if perm := getValueInMap(context, mountPermissionsField); perm != "" {
113113
var err error
114114
if mountPermissions, err = strconv.ParseUint(perm, 8, 32); err != nil {
115-
return nil, status.Errorf(codes.InvalidArgument, fmt.Sprintf("invalid mountPermissions %s", perm))
115+
return nil, status.Errorf(codes.InvalidArgument, "invalid mountPermissions %s", perm)
116116
}
117117
}
118118
}
@@ -141,7 +141,7 @@ func (d *Driver) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolu
141141
klog.Warningf("NodePublishVolume: mock mount on volumeID(%s), this is only for TESTING!!!", volumeID)
142142
if err := volumehelper.MakeDir(target, os.FileMode(mountPermissions)); err != nil {
143143
klog.Errorf("MakeDir failed on target: %s (%v)", target, err)
144-
return nil, status.Errorf(codes.Internal, err.Error())
144+
return nil, status.Errorf(codes.Internal, "%v", err)
145145
}
146146
return &csi.NodePublishVolumeResponse{}, nil
147147
}
@@ -297,7 +297,7 @@ func (d *Driver) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRe
297297
var err error
298298
var perm uint64
299299
if perm, err = strconv.ParseUint(v, 8, 32); err != nil {
300-
return nil, status.Errorf(codes.InvalidArgument, fmt.Sprintf("invalid mountPermissions %s", v))
300+
return nil, status.Errorf(codes.InvalidArgument, "invalid mountPermissions %s", v)
301301
}
302302
if perm == 0 {
303303
performChmodOp = false
@@ -325,7 +325,7 @@ func (d *Driver) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRe
325325

326326
_, accountName, _, containerName, authEnv, err := d.GetAuthEnv(ctx, volumeID, protocol, attrib, secrets)
327327
if err != nil {
328-
return nil, status.Errorf(codes.Internal, err.Error())
328+
return nil, status.Errorf(codes.Internal, "%v", err)
329329
}
330330

331331
// replace pv/pvc name namespace metadata in subDir
@@ -429,7 +429,7 @@ func (d *Driver) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRe
429429
klog.Warningf("NodeStageVolume: mock mount on volumeID(%s), this is only for TESTING!!!", volumeID)
430430
if err := volumehelper.MakeDir(targetPath, os.FileMode(mountPermissions)); err != nil {
431431
klog.Errorf("MakeDir failed on target: %s (%v)", targetPath, err)
432-
return nil, status.Errorf(codes.Internal, err.Error())
432+
return nil, status.Errorf(codes.Internal, "%v", err)
433433
}
434434
return &csi.NodeStageVolumeResponse{}, nil
435435
}
@@ -549,7 +549,7 @@ func (d *Driver) NodeGetVolumeStats(_ context.Context, req *csi.NodeGetVolumeSta
549549
// check if the volume stats is cached
550550
cache, err := d.volStatsCache.Get(req.VolumeId, azcache.CacheReadTypeDefault)
551551
if err != nil {
552-
return nil, status.Errorf(codes.Internal, err.Error())
552+
return nil, status.Errorf(codes.Internal, "%v", err)
553553
}
554554
if cache != nil {
555555
resp := cache.(csi.NodeGetVolumeStatsResponse)

pkg/csi-common/utils.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func ParseEndpoint(ep string) (string, string, error) {
4444
func Listen(ctx context.Context, endpoint string) (net.Listener, error) {
4545
proto, addr, err := ParseEndpoint(endpoint)
4646
if err != nil {
47-
klog.Errorf(err.Error())
47+
klog.Errorf("%v", err)
4848
return nil, err
4949
}
5050

@@ -53,7 +53,7 @@ func Listen(ctx context.Context, endpoint string) (net.Listener, error) {
5353
addr = "/" + addr
5454
}
5555
if err := os.Remove(addr); err != nil && !os.IsNotExist(err) {
56-
klog.Errorf("Failed to remove %s, error: %s", addr, err.Error())
56+
klog.Errorf("Failed to remove %s, error: %v", addr, err)
5757
return nil, err
5858
}
5959
}

pkg/csi-common/utils_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ func TestLogGRPC(t *testing.T) {
9090
klog.SetOutput(buf)
9191
defer klog.SetOutput(io.Discard)
9292

93-
handler := func(ctx context.Context, req interface{}) (interface{}, error) { return nil, nil }
93+
handler := func(_ context.Context, _ interface{}) (interface{}, error) { return nil, nil }
9494
info := grpc.UnaryServerInfo{
9595
FullMethod: "fake",
9696
}

test/e2e/dynamic_provisioning_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ var _ = ginkgo.Describe("[blob-csi-e2e] Dynamic Provisioning", func() {
4040
testDriver driver.PVTestDriver
4141
)
4242

43-
ginkgo.BeforeEach(func(ctx ginkgo.SpecContext) {
43+
ginkgo.BeforeEach(func(_ ginkgo.SpecContext) {
4444
checkPodsRestart := testCmd{
4545
command: "sh",
4646
args: []string{"test/utils/check_driver_pods_restart.sh"},
@@ -891,7 +891,7 @@ var _ = ginkgo.Describe("[blob-csi-e2e] Dynamic Provisioning", func() {
891891
test.Run(ctx, cs, ns)
892892
})
893893

894-
ginkgo.It("[blob.csi.azure.com] verify examples", ginkgo.Label("flaky"), func(ctx ginkgo.SpecContext) {
894+
ginkgo.It("[blob.csi.azure.com] verify examples", ginkgo.Label("flaky"), func(_ ginkgo.SpecContext) {
895895
createExampleDeployment := testCmd{
896896
command: "bash",
897897
args: []string{"hack/verify-examples.sh"},

test/e2e/suite_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ var _ = ginkgo.SynchronizedBeforeSuite(func(ctx ginkgo.SpecContext) []byte {
109109
}
110110
execTestCmd([]testCmd{e2eBootstrap, createMetricsSVC})
111111
return nil
112-
}, func(ctx ginkgo.SpecContext, data []byte) {
112+
}, func(_ ginkgo.SpecContext, _ []byte) {
113113
// k8s.io/kubernetes/test/e2e/framework requires env KUBECONFIG to be set
114114
// it does not fall back to defaults
115115
if os.Getenv(kubeconfigEnvVar) == "" {
@@ -140,7 +140,7 @@ var _ = ginkgo.SynchronizedBeforeSuite(func(ctx ginkgo.SpecContext) []byte {
140140
}()
141141
})
142142

143-
var _ = ginkgo.SynchronizedAfterSuite(func(ctx ginkgo.SpecContext) {},
143+
var _ = ginkgo.SynchronizedAfterSuite(func(_ ginkgo.SpecContext) {},
144144
func(ctx ginkgo.SpecContext) {
145145
blobLog := testCmd{
146146
command: "bash",
@@ -188,7 +188,7 @@ func execTestCmd(cmds []testCmd) {
188188
cmdSh.Stderr = os.Stderr
189189
err := cmdSh.Run()
190190
if err != nil {
191-
log.Printf("Failed to run command: %s %s, Error: %s\n", cmd.command, strings.Join(cmd.args, " "), err.Error())
191+
log.Printf("Failed to run command: %s %s, Error: %v\n", cmd.command, strings.Join(cmd.args, " "), err)
192192
}
193193
gomega.Expect(err).NotTo(gomega.HaveOccurred())
194194
log.Println(cmd.endLog)

0 commit comments

Comments
 (0)