beszel / src /internal /hub /utils /utils.go
cacodex's picture
Deploy Beszel hub with ephemeral Space recovery
3959f31 verified
Raw
History Blame Contribute Delete
379 Bytes
// Package utils provides utility functions for the hub.
package utils
import "os"
// GetEnv retrieves an environment variable with a "BESZEL_HUB_" prefix, or falls back to the unprefixed key.
func GetEnv(key string) (value string, exists bool) {
if value, exists = os.LookupEnv("BESZEL_HUB_" + key); exists {
return value, exists
}
return os.LookupEnv(key)
}