b1f8ac453b
feat!: base template * first bit of templating * codeowners * linuxbased * restart * baseline project * add grpc api and basic integration test * startqueue * queueMsg * splitscripts * migrations * queueintegrationtest * gateway
25 lines
355 B
Go
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
|
|
}
|