Abstracts database storage & Status page UI (#88)

This commit is contained in:
Georgios Komninos 2021-08-28 15:10:30 +02:00 committed by GitHub
parent 7bb80c0c2e
commit b7c0990dcb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 456 additions and 256 deletions

View file

@ -368,3 +368,11 @@ func WriteWireGuardServerConfig(tmplBox *rice.Box, serverConfig model.Server, cl
return nil
}
// GetCredVar reads value from environment variable or returns fallback
func GetCredVar(key, fallback string) string {
if value, ok := os.LookupEnv(key); ok {
return value
}
return fallback
}