updated ui/dist and some lint warnings

This commit is contained in:
Gani Georgiev
2023-07-30 13:40:22 +03:00
parent ac1fd74942
commit bb4a5cfe83
47 changed files with 3421 additions and 3453 deletions
+3 -3
View File
@@ -34,11 +34,11 @@ func MoveDirContent(src string, dest string, rootExclude ...string) error {
moved := map[string]string{}
tryRollback := func() ([]error) {
tryRollback := func() []error {
errs := []error{}
for old, new := range moved {
if err := os.Rename(new, old); err != nil{
if err := os.Rename(new, old); err != nil {
errs = append(errs, err)
}
}
@@ -64,7 +64,7 @@ func MoveDirContent(src string, dest string, rootExclude ...string) error {
new := filepath.Join(dest, basename)
if err := os.Rename(old, new); err != nil {
if errs := tryRollback(); len(errs) > 0 {
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)