Skip to content

Commit 6be1734

Browse files
authored
chore: bump golangci-lint to 2.5.0 (#5011)
1 parent 3f40db7 commit 6be1734

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

internal/namespaces/instance/v1/custom_image_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ func Test_ImageDelete(t *testing.T) {
8888
_, err := api.GetSnapshot(&instanceSDK.GetSnapshotRequest{
8989
SnapshotID: snapshot.Snapshot.ID,
9090
})
91-
assert.IsType(t, &scw.ResourceNotFoundError{}, err)
91+
assert.ErrorAs(t, err, new(*scw.ResourceNotFoundError))
9292
},
9393
),
9494
AfterFunc: deleteServer("Server"),

internal/namespaces/instance/v1/custom_server_action_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ func Test_ServerTerminate(t *testing.T) {
7474
_, err := api.GetIP(&instanceSDK.GetIPRequest{
7575
IP: server.PublicIP.ID,
7676
})
77-
require.IsType(t, &scw.PermissionsDeniedError{}, err)
77+
require.ErrorAs(t, err, new(*scw.PermissionsDeniedError))
7878
},
7979
),
8080
DisableParallel: true,
@@ -131,14 +131,14 @@ func Test_ServerTerminate(t *testing.T) {
131131
VolumeID: rootVolume.ID,
132132
Zone: server.Zone,
133133
})
134-
require.IsType(t, &scw.ResourceNotFoundError{}, err)
134+
require.ErrorAs(t, err, new(*scw.ResourceNotFoundError))
135135

136136
additionalVolume := testhelpers.MapTValue(t, server.Volumes, "1")
137137
_, err = api.GetVolume(&blockSDK.GetVolumeRequest{
138138
VolumeID: additionalVolume.ID,
139139
Zone: server.Zone,
140140
})
141-
require.IsType(t, &scw.ResourceNotFoundError{}, err)
141+
require.ErrorAs(t, err, new(*scw.ResourceNotFoundError))
142142
},
143143
),
144144
DisableParallel: true,

internal/namespaces/vpc/v2/custom_private_network.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -71,57 +71,57 @@ func privateNetworkGetBuilder(c *core.Command) *core.Command {
7171
g.Go(func() (err error) {
7272
instanceServers, err = listCustomInstanceServers(groupCtx, client, pn)
7373

74-
return
74+
return err
7575
})
7676
g.Go(func() (err error) {
7777
baremetalServers, err = listCustomBaremetalServers(groupCtx, client, pn)
7878

79-
return
79+
return err
8080
})
8181
g.Go(func() (err error) {
8282
k8sClusters, err = listCustomK8sClusters(groupCtx, client, pn)
8383

84-
return
84+
return err
8585
})
8686
g.Go(func() (err error) {
8787
lbs, err = listCustomLBs(groupCtx, client, pn)
8888

89-
return
89+
return err
9090
})
9191
g.Go(func() (err error) {
9292
rdbs, err = listCustomRdbs(groupCtx, client, pn)
9393

94-
return
94+
return err
9595
})
9696
g.Go(func() (err error) {
9797
redisClusters, err = listCustomRedisClusters(groupCtx, client, pn)
9898

99-
return
99+
return err
100100
})
101101
g.Go(func() (err error) {
102102
gateways, err = listCustomGateways(groupCtx, client, pn)
103103

104-
return
104+
return err
105105
})
106106
g.Go(func() (err error) {
107107
appleSiliconServers, err = listCustomAppleSiliconServers(groupCtx, client, pn)
108108

109-
return
109+
return err
110110
})
111111
g.Go(func() (err error) {
112112
mongoDBs, err = listCustomMongoDBs(groupCtx, client, pn)
113113

114-
return
114+
return err
115115
})
116116
g.Go(func() (err error) {
117117
ipamIPs, err = listCustomIPAMIPs(groupCtx, client, pn)
118118

119-
return
119+
return err
120120
})
121121
g.Go(func() (err error) {
122122
inferenceDeployments, err = listCustomInferenceDeployments(groupCtx, client, pn)
123123

124-
return
124+
return err
125125
})
126126

127127
if err = g.Wait(); err != nil {

internal/tasks/tasks.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ func Add[TaskArg any, TaskReturn any](
7878
passedData, err = taskFunc(t, i.(TaskArg))
7979
}
8080

81-
return
81+
return passedData, err
8282
},
8383
})
8484
}

0 commit comments

Comments
 (0)