new stuff cool ig

Signed-off-by: Odyssey346 <odyssey346@disroot.org>
This commit is contained in:
Odyssey346
2022-07-27 19:00:48 +02:00
parent 26c4a288ca
commit cdd7bfbea7
3 changed files with 62 additions and 19 deletions

View File

@ -1,4 +1,4 @@
// Please ignore this :))))))) :(
// Please ignore my terrible code :) It works
package otherthings
import (
@ -6,8 +6,10 @@ import (
"log"
)
var unused string
var ok1 bool
var (
unused string
ok1 bool
)
func CheckEnv() {
unused, ok1 = os.LookupEnv("SEGFAUTILITIES_PORT")
@ -16,6 +18,17 @@ func CheckEnv() {
} else {
log.Fatal("[Segfautilities] Environment variable SEGFAUTILITIES_PORT is not set! Please set it to a number, for example 6893")
}
unused, ok1 = os.LookupEnv("HCAPTCHA_SITE_KEY")
if !ok1 {
log.Fatal("[Segfautilities] Environment variable HCAPTCHA_SITE_KEY is not set! Please set it to the site key you got from hCaptcha.")
} else {
log.Println("[Segfautilities] Environment variable HCAPTCHA_SITE_KEY is set as " + unused)
}
unused, ok1 = os.LookupEnv("HCAPTCHA_SECRET_KEY")
if !ok1 {
log.Fatal("[Segfautilities] Environment variable HCAPTCHA_SECRET_KEY is not set! Please set it to the secret key you got from hCaptcha.")
} else {
log.Println("[Segfautilities] Environment variable HCAPTCHA_SECRET_KEY is set!")
}
log.Println("[Segfautilities] ✅ Passed the Environment Variables check")
}