fix: restore int64 environment parsing
Docker / Docker Build & Push (push) Successful in 3m32s
Lint / Lint (push) Successful in 27s
Tests / Go backend (push) Successful in 30s
Tests / Dashboard checks (push) Successful in 35s

This commit is contained in:
Gabriel20xx committed 2026-09-23 06:13:52 +02:00
1 parent a4f897572c
commit 775a5520b6
2 files changed
+54

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
package main
import (
"os"
"strconv"
"strings"
)
// envInt64 returns the parsed environment value or fallback when the variable
// is unset, empty, or not a valid base-10 int64.
func envInt64(name string, fallback int64) int64 {
value := strings.TrimSpace(os.Getenv(name))
if value == "" {
return fallback
}
parsed, err := strconv.ParseInt(value, 10, 64)
if err != nil {
return fallback
}
return parsed
}