move unit related constant to common lib

This commit is contained in:
2026-06-26 20:27:23 +00:00
parent e2de9c5083
commit cbda49ff69
3 changed files with 9 additions and 17 deletions
-10
View File
@@ -7,8 +7,6 @@ import (
"strings"
)
const MiB = 1024 * 1024
type Config struct {
ListenPort int `json:"listenPort"`
PVE struct {
@@ -65,11 +63,3 @@ func AnyPrefixes(s string, prefixes []string) string {
return ""
}
func SafeUint64(i int) uint64 {
if i < 0 {
log.Printf("Tried to cast %d to uint64", i)
return 0
}
return uint64(i)
}