Files
query-orchestration/internal/env/get.go
T
Michael McGuinness fc4214336e normaliseeol
2024-12-19 11:44:19 +00:00

25 lines
355 B
Go

package env
import (
"log"
"os"
)
func GetRequired(name string) string {
value, exists := os.LookupEnv(name)
if !exists {
log.Fatal("Environment variable not set: ", name)
}
return value
}
func Get(name string) string {
value, exists := os.LookupEnv(name)
if !exists {
log.Print("Environment variable not set: ", name)
}
return value
}