Skip to content

Commit e376f41

Browse files
committed
Fix linter
1 parent 9103213 commit e376f41

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

internal/services/container/container.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,7 @@ func ResourceContainerUpdate(ctx context.Context, d *schema.ResourceData, m inte
468468
if err != nil {
469469
return diag.FromErr(err)
470470
}
471+
471472
req.ScalingOption = scalingOptionReq
472473
>>>>>>> d04ca3f0 (feat(container/serverless): add scaling_option block)
473474
}

internal/services/container/helpers_container.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ func setCreateContainerRequest(d *schema.ResourceData, region scw.Region) (*cont
131131
if err != nil {
132132
return nil, err
133133
}
134+
134135
req.ScalingOption = scalingOptionReq
135136
}
136137

@@ -241,15 +242,18 @@ func expandScalingOptions(scalingOptionSchema interface{}) (*container.Container
241242
}
242243

243244
setFields := 0
245+
244246
cso := &container.ContainerScalingOption{}
245247
if concurrentRequestThresold, ok := rawOption["concurrent_requests_threshold"].(int); ok && concurrentRequestThresold != 0 {
246248
cso.ConcurrentRequestsThreshold = scw.Uint32Ptr(uint32(concurrentRequestThresold))
247249
setFields++
248250
}
251+
249252
if cpuUsageThreshold, ok := rawOption["cpu_usage_threshold"].(int); ok && cpuUsageThreshold != 0 {
250253
cso.CPUUsageThreshold = scw.Uint32Ptr(uint32(cpuUsageThreshold))
251254
setFields++
252255
}
256+
253257
if memoryUsageThreshold, ok := rawOption["memory_usage_threshold"].(int); ok && memoryUsageThreshold != 0 {
254258
cso.MemoryUsageThreshold = scw.Uint32Ptr(uint32(memoryUsageThreshold))
255259
setFields++
@@ -258,6 +262,7 @@ func expandScalingOptions(scalingOptionSchema interface{}) (*container.Container
258262
if setFields > 1 {
259263
return &container.ContainerScalingOption{}, errors.New("a maximum of one scaling option can be set")
260264
}
265+
261266
return cso, nil
262267
}
263268

0 commit comments

Comments
 (0)