Init and optimizations

This commit is contained in:
2025-07-12 23:09:54 +02:00
parent 1a0b081e96
commit 77e4a2b6d1
11 changed files with 1061 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
package racc_common
import (
"os"
"strconv"
"strings"
)
func GetENV(k, d string) string {
if v := os.Getenv(k); v != "" {
return v
}
return d
}
func Enabled(k string, def bool) bool {
b, err := strconv.ParseBool(strings.ToLower(os.Getenv(k)))
if err != nil {
return def
}
return b
}