Optimize string contrast judgment (#5821)

Signed-off-by: Fish-pro <zechun.chen@daocloud.io>
This commit is contained in:
Fish-pro
2023-02-06 14:52:01 +08:00
committed by GitHub
parent 843c70959f
commit a761111ba1
2 changed files with 6 additions and 7 deletions

View File

@@ -462,9 +462,9 @@ func VeleroScheduleCreate(ctx context.Context, veleroCLI string, veleroNamespace
func VeleroSchedulePause(ctx context.Context, veleroCLI string, veleroNamespace string, scheduleName string) error {
var args []string
args = append([]string{
args = []string{
"--namespace", veleroNamespace, "schedule", "pause", scheduleName,
})
}
if err := VeleroCmdExec(ctx, veleroCLI, args); err != nil {
return err
}
@@ -473,9 +473,9 @@ func VeleroSchedulePause(ctx context.Context, veleroCLI string, veleroNamespace
func VeleroScheduleUnpause(ctx context.Context, veleroCLI string, veleroNamespace string, scheduleName string) error {
var args []string
args = append([]string{
args = []string{
"--namespace", veleroNamespace, "schedule", "unpause", scheduleName,
})
}
if err := VeleroCmdExec(ctx, veleroCLI, args); err != nil {
return err
}