Enable linter revive and resolve found errors: part 1

Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
This commit is contained in:
Xun Jiang
2023-04-24 15:29:20 +08:00
parent a0b0b7cd9b
commit 180cc4e31d
40 changed files with 150 additions and 171 deletions

View File

@@ -243,7 +243,7 @@ func (c *backupOperationsReconciler) updateBackupAndOperationsJSON(
// update file store
if backupStore != nil {
backupJSON := new(bytes.Buffer)
if err := encode.EncodeTo(backup, "json", backupJSON); err != nil {
if err := encode.To(backup, "json", backupJSON); err != nil {
removeIfComplete = false
return errors.Wrap(err, "error encoding backup json")
}