refactor: drop two unmaintained dependencies, rename the byte size helpers (#39083)

This commit is contained in:
silverwind authored and GitHub committed 2026-08-27 15:31:20 +00:00
1 parent 3b6ce586a7
commit 66c672d0b7
33 files changed
+197 -180

No files matched your search

-7
View File
@@ -16,8 +16,6 @@ import (
"gitea.dev/modules/setting"
"gitea.dev/modules/util"
"github.com/dustin/go-humanize"
)
// EncodeSha256 string to sha256 hex value.
@@ -92,11 +90,6 @@ func CreateTimeLimitCode[T time.Time | string](data string, minutes int, startTi
return code
}
// FileSize calculates the file size and generate user-friendly string.
func FileSize(s int64) string {
return humanize.IBytes(uint64(s))
}
// StringsToInt64s converts a slice of string to a slice of int64.
func StringsToInt64s(strs []string) ([]int64, error) {
if strs == nil {