From 0171a91366dd45950a2c5df2d35bf6e0977dbdda Mon Sep 17 00:00:00 2001 From: "Hoang, Phuong" Date: Mon, 21 Mar 2022 12:01:26 -0400 Subject: [PATCH] Correct copyright comment and string compare Signed-off-by: Hoang, Phuong --- pkg/backup/pod_action.go | 4 ++-- pkg/backup/pod_action_test.go | 2 +- pkg/kuberesource/kuberesource.go | 2 +- pkg/restore/pod_action.go | 4 ++-- pkg/restore/pod_action_test.go | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pkg/backup/pod_action.go b/pkg/backup/pod_action.go index bd1005500..d0e834fbb 100644 --- a/pkg/backup/pod_action.go +++ b/pkg/backup/pod_action.go @@ -1,5 +1,5 @@ /* -Copyright 2017, 2022 the Velero contributors. +Copyright the Velero contributors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -57,7 +57,7 @@ func (a *PodAction) Execute(item runtime.Unstructured, backup *v1.Backup) (runti } var additionalItems []velero.ResourceIdentifier - if pod.Spec.PriorityClassName > "" { + if pod.Spec.PriorityClassName != "" { a.log.Infof("Adding priorityclass %s to additionalItems", pod.Spec.PriorityClassName) additionalItems = append(additionalItems, velero.ResourceIdentifier{ GroupResource: kuberesource.PriorityClasses, diff --git a/pkg/backup/pod_action_test.go b/pkg/backup/pod_action_test.go index 80c9127d6..1618b3089 100644 --- a/pkg/backup/pod_action_test.go +++ b/pkg/backup/pod_action_test.go @@ -1,5 +1,5 @@ /* -Copyright 2018, 2022 the Velero contributors. +Copyright the Velero contributors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kuberesource/kuberesource.go b/pkg/kuberesource/kuberesource.go index a3a087244..c2c2d84ee 100644 --- a/pkg/kuberesource/kuberesource.go +++ b/pkg/kuberesource/kuberesource.go @@ -1,5 +1,5 @@ /* -Copyright 2018, 2022 the Velero contributors. +Copyright the Velero contributors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/restore/pod_action.go b/pkg/restore/pod_action.go index adfc83c0d..d4bdc1384 100644 --- a/pkg/restore/pod_action.go +++ b/pkg/restore/pod_action.go @@ -1,5 +1,5 @@ /* -Copyright 2017, 2022 the Velero contributors. +Copyright the Velero contributors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -87,7 +87,7 @@ func (a *PodAction) Execute(input *velero.RestoreItemActionExecuteInput) (*veler return nil, errors.WithStack(err) } restoreExecuteOutput := velero.NewRestoreItemActionExecuteOutput(&unstructured.Unstructured{Object: res}) - if pod.Spec.PriorityClassName > "" { + if pod.Spec.PriorityClassName != "" { a.logger.Infof("Adding priorityclass %s to AdditionalItems", pod.Spec.PriorityClassName) restoreExecuteOutput.AdditionalItems = []velero.ResourceIdentifier{ {GroupResource: kuberesource.PriorityClasses, Name: pod.Spec.PriorityClassName}} diff --git a/pkg/restore/pod_action_test.go b/pkg/restore/pod_action_test.go index 0d6226fe2..f1aa83c1a 100644 --- a/pkg/restore/pod_action_test.go +++ b/pkg/restore/pod_action_test.go @@ -1,5 +1,5 @@ /* -Copyright 2017, 2019, 2022 the Velero contributors. +Copyright the Velero contributors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.