1
0
mirror of https://github.com/pocketbase/pocketbase.git synced 2025-12-01 09:16:40 +02:00

logs refactoring

This commit is contained in:
Gani Georgiev
2023-11-26 13:33:17 +02:00
parent ff5535f4de
commit 821aae4a62
109 changed files with 7320 additions and 3728 deletions

View File

@@ -1,7 +1,7 @@
package osutils
import (
"log"
"errors"
"os"
"path/filepath"
@@ -65,9 +65,8 @@ func MoveDirContent(src string, dest string, rootExclude ...string) error {
if err := os.Rename(old, new); err != nil {
if errs := tryRollback(); len(errs) > 0 {
// currently just log the rollback errors
// in the future we may require go 1.20+ to use errors.Join()
log.Println(errs)
errs = append(errs, err)
err = errors.Join(errs...)
}
return err