mirror of
https://github.com/httpjamesm/AnonymousOverflow.git
synced 2024-12-06 19:16:43 +01:00
feat!: run checks on env variables
This commit is contained in:
Vendored
+16
@@ -0,0 +1,16 @@
|
||||
package env
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
)
|
||||
|
||||
func RunChecks() {
|
||||
checkEnv("APP_URL")
|
||||
}
|
||||
|
||||
func checkEnv(key string) {
|
||||
if os.Getenv(key) == "" {
|
||||
panic(fmt.Sprintf("Environment variable %s is not set", key))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user