Skip to content

Commit 8d724b1

Browse files
committed
style(rdb): fix lint nlreturn and golines issues
1 parent 793cffb commit 8d724b1

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

internal/namespaces/rdb/v1/custom_instance.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,11 @@ func instanceGetBuilder(c *core.Command) *core.Command {
441441
}
442442

443443
// instanceUpgradeInterceptor checks if upgrade is needed and returns success if no change
444-
func instanceUpgradeInterceptor(ctx context.Context, argsI any, runner core.CommandRunner) (any, error) {
444+
func instanceUpgradeInterceptor(
445+
ctx context.Context,
446+
argsI any,
447+
runner core.CommandRunner,
448+
) (any, error) {
445449
req := argsI.(*rdbSDK.UpgradeInstanceRequest)
446450

447451
client := core.ExtractClient(ctx)
@@ -513,6 +517,7 @@ func checkNodeTypeChange(f reflect.Value, currentNodeType string) bool {
513517
case *string:
514518
return v != nil && !strings.EqualFold(currentNodeType, *v)
515519
}
520+
516521
return false
517522
}
518523

@@ -523,6 +528,7 @@ func checkEnableHaChange(f reflect.Value, isHaCluster bool) bool {
523528
case *bool:
524529
return v != nil && *v && !isHaCluster
525530
}
531+
526532
return false
527533
}
528534

@@ -538,6 +544,7 @@ func checkVolumeTypeChange(f reflect.Value, currentType rdbSDK.VolumeType) bool
538544
default:
539545
desired = fmt.Sprint(f.Interface())
540546
}
547+
541548
return desired != "" && fmt.Sprint(currentType) != desired
542549
}
543550

@@ -548,6 +555,7 @@ func checkVolumeSizeChange(f reflect.Value, currentSize scw.Size) bool {
548555
case *uint64:
549556
return v != nil && *v > uint64(currentSize)
550557
}
558+
551559
return false
552560
}
553561

@@ -578,6 +586,7 @@ func checkEngineUpgrade(rv reflect.Value) bool {
578586
}
579587
}
580588
}
589+
581590
return false
582591
}
583592

internal/namespaces/rdb/v1/custom_user.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ func userCreateBuilder(c *core.Command) *core.Command {
133133
User: users.Users[0],
134134
Password: "", // no password for existing user
135135
}
136+
136137
return result, nil
137138
}
138139
}

0 commit comments

Comments
 (0)