onyx-and-iris 3d1c8f90f3 remove init function\
remove global vars proxies, host
2024-09-28 15:36:24 +01:00

19 lines
219 B
Go

package main
import (
"os"
"strconv"
)
func getEnvInt(key string) (int, error) {
s := os.Getenv(key)
if s == "" {
return 0, nil
}
v, err := strconv.Atoi(s)
if err != nil {
return 0, err
}
return v, nil
}