mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-29 18:30:54 +00:00
refactor: drop two unmaintained dependencies, rename the byte size helpers (#39083)
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user