「✨」 feat: Finished wordpress/php container
This commit is contained in:
23
srcs/internal/env/env_set.go
vendored
Normal file
23
srcs/internal/env/env_set.go
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
package env
|
||||
|
||||
import (
|
||||
"log"
|
||||
"os"
|
||||
"regexp"
|
||||
)
|
||||
|
||||
func IsEnvSet(what string) bool {
|
||||
env := os.Environ()
|
||||
|
||||
reg, err := regexp.Compile("^" + what)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
for _, v := range env {
|
||||
if reg.MatchString(v) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
Reference in New Issue
Block a user