mirror of
https://github.com/ngoduykhanh/wireguard-ui.git
synced 2025-06-06 00:37:24 +03:00
Abstracts database storage & Status page UI (#88)
This commit is contained in:
parent
7bb80c0c2e
commit
b7c0990dcb
14 changed files with 456 additions and 256 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue