Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
linkas45 committed Apr 29, 2024
1 parent 5412cec commit 4c76de3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions castai/resource_node_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,7 @@ func toTemplateConstraints(d *schema.ResourceData, obj map[string]any) *sdk.Node

out := &sdk.NodetemplatesV1TemplateConstraints{}
// todo: replace with tri-state enum as GetOkExists is deprecated
if v, exists := d.GetOkExists(FieldNodeTemplateConstraints + ".0." + FieldNodeTemplateComputeOptimized); exists { //lint:ignore SA1019 this will be refactored
if v, exists := d.GetOkExists(FieldNodeTemplateConstraints + ".0." + FieldNodeTemplateComputeOptimized); exists { // nolint: staticcheck
out.ComputeOptimized = toPtr(v.(bool))
}
if v, ok := obj[FieldNodeTemplateFallbackRestoreRateSeconds].(int); ok {
Expand Down Expand Up @@ -1075,7 +1075,7 @@ func toTemplateConstraints(d *schema.ResourceData, obj map[string]any) *sdk.Node
}
}
// todo: replace with tri-state enum as GetOkExists is deprecated
if v, exists := d.GetOkExists(FieldNodeTemplateConstraints + ".0." + FieldNodeTemplateStorageOptimized); exists { //lint:ignore SA1019 this will be refactored
if v, exists := d.GetOkExists(FieldNodeTemplateConstraints + ".0." + FieldNodeTemplateStorageOptimized); exists { // nolint: staticcheck
out.StorageOptimized = toPtr(v.(bool))
}
if v, ok := obj[FieldNodeTemplateUseSpotFallbacks].(bool); ok {
Expand Down

0 comments on commit 4c76de3

Please sign in to comment.