platform: modularize api/gui, add docs-tests-web foundation, and refresh root config
This commit is contained in:
23
selective-vpn-api/app/resolver_precheck_flags.go
Normal file
23
selective-vpn-api/app/resolver_precheck_flags.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"os"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func resolvePrecheckForceEnvEnabled() bool {
|
||||
switch strings.ToLower(strings.TrimSpace(os.Getenv("RESOLVE_PRECHECK_FORCE"))) {
|
||||
case "1", "true", "yes", "on":
|
||||
return true
|
||||
default:
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
func resolvePrecheckForceFileEnabled(path string) bool {
|
||||
if strings.TrimSpace(path) == "" {
|
||||
return false
|
||||
}
|
||||
_, err := os.Stat(path)
|
||||
return err == nil
|
||||
}
|
||||
Reference in New Issue
Block a user