mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-14 13:44:45 +00:00
refactor: drop two unmaintained dependencies, rename the byte size helpers (#39083)
This commit is contained in:
1 parent
3b6ce586a7
commit
66c672d0b7
33 files changed
+197
-180
No files matched your search
@@ -7,7 +7,7 @@ import (
|
||||
"fmt"
|
||||
"math"
|
||||
|
||||
"github.com/dustin/go-humanize"
|
||||
"gitea.dev/modules/util"
|
||||
)
|
||||
|
||||
// Package registry settings
|
||||
@@ -100,7 +100,7 @@ func mustBytes(section ConfigSection, key string) int64 {
|
||||
if value == noLimit {
|
||||
return -1
|
||||
}
|
||||
bytes, err := humanize.ParseBytes(value)
|
||||
bytes, err := util.ParseByteSize(value)
|
||||
if err != nil || bytes > math.MaxInt64 {
|
||||
return -1
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user