Skip to content

Commit 1f5f702

Browse files
committed
fix: use staticcheck nolint for GetOkExists deprecation warnings
1 parent e19efa1 commit 1f5f702

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

internal/services/k8s/cluster.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ func ResourceCluster() *schema.Resource {
266266
},
267267
CustomizeDiff: customdiff.All(
268268
func(_ context.Context, diff *schema.ResourceDiff, _ any) error {
269-
autoUpgradeEnable, okAutoUpgradeEnable := diff.GetOkExists("auto_upgrade.0.enable")
269+
autoUpgradeEnable, okAutoUpgradeEnable := diff.GetOkExists("auto_upgrade.0.enable") //nolint:staticcheck
270270

271271
version := diff.Get("version").(string)
272272
versionIsOnlyMinor := len(strings.Split(version, ".")) == 2
@@ -484,8 +484,8 @@ func ResourceK8SClusterCreate(ctx context.Context, d *schema.ResourceData, m any
484484

485485
// Auto-upgrade configuration
486486

487-
autoUpgradeEnable, okAutoUpgradeEnable := d.GetOkExists("auto_upgrade.0.enable")
488-
autoUpgradeStartHour, okAutoUpgradeStartHour := d.GetOkExists("auto_upgrade.0.maintenance_window_start_hour")
487+
autoUpgradeEnable, okAutoUpgradeEnable := d.GetOkExists("auto_upgrade.0.enable") //nolint:staticcheck
488+
autoUpgradeStartHour, okAutoUpgradeStartHour := d.GetOkExists("auto_upgrade.0.maintenance_window_start_hour") //nolint:staticcheck
489489
autoUpgradeDay, okAutoUpgradeDay := d.GetOk("auto_upgrade.0.maintenance_window_day")
490490

491491
if okAutoUpgradeEnable {

internal/types/bool.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ func ExpandBoolPtr(data any) *bool {
2222
}
2323

2424
func GetBool(d *schema.ResourceData, key string) any {
25-
val, ok := d.GetOkExists(key)
25+
val, ok := d.GetOkExists(key) //nolint:staticcheck
2626
if !ok {
2727
return nil
2828
}

0 commit comments

Comments
 (0)