mirror of
https://github.com/muety/wakapi.git
synced 2023-08-10 21:12:56 +03:00
15 lines
178 B
Go
15 lines
178 B
Go
|
package utils
|
||
|
|
||
|
import (
|
||
|
"log"
|
||
|
"os"
|
||
|
)
|
||
|
|
||
|
func LookupFatal(key string) string {
|
||
|
v, ok := os.LookupEnv(key)
|
||
|
if !ok {
|
||
|
log.Fatalf("missing env variable '%s'", key)
|
||
|
}
|
||
|
return v
|
||
|
}
|