Updated transitive dependencies

This commit is contained in:
Seednode 2024-01-04 08:43:52 -06:00
parent 9e2b4ad9c3
commit b90f6cfc64
2 changed files with 17 additions and 2 deletions

View File

@ -10,6 +10,7 @@ import (
"io/fs" "io/fs"
"math/big" "math/big"
"regexp" "regexp"
"slices"
"crypto/rand" "crypto/rand"
"os" "os"
@ -461,6 +462,8 @@ Poll:
) )
} }
slices.Sort(list)
return list, nil return list, nil
} }

View File

@ -111,11 +111,17 @@ func (index *fileIndex) Export(path string) error {
length := len(index.list) length := len(index.list)
index.mutex.RUnlock() index.mutex.RUnlock()
stats, err := file.Stat()
if err != nil {
return err
}
if Verbose { if Verbose {
fmt.Printf("%s | INDEX: Exported %d entries to %s in %s\n", fmt.Printf("%s | INDEX: Exported %d entries to %s (%s) in %s\n",
time.Now().Format(logDate), time.Now().Format(logDate),
length, length,
path, path,
humanReadableSize(int(stats.Size())),
time.Since(startTime), time.Since(startTime),
) )
} }
@ -132,6 +138,11 @@ func (index *fileIndex) Import(path string) error {
} }
defer file.Close() defer file.Close()
stats, err := file.Stat()
if err != nil {
return err
}
z, err := zstd.NewReader(file) z, err := zstd.NewReader(file)
if err != nil { if err != nil {
return err return err
@ -149,10 +160,11 @@ func (index *fileIndex) Import(path string) error {
index.mutex.Unlock() index.mutex.Unlock()
if Verbose { if Verbose {
fmt.Printf("%s | INDEX: Imported %d entries from %s in %s\n", fmt.Printf("%s | INDEX: Imported %d entries from %s (%s) in %s\n",
time.Now().Format(logDate), time.Now().Format(logDate),
length, length,
path, path,
humanReadableSize(int(stats.Size())),
time.Since(startTime), time.Since(startTime),
) )
} }