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