imported env module

This commit is contained in:
2026-01-02 19:03:07 +11:00
parent 516be905a9
commit ade3fa0454
5 changed files with 112 additions and 0 deletions

14
env/string.go vendored Normal file
View File

@@ -0,0 +1,14 @@
package env
import (
"os"
)
// Get an environment variable, specifying a default value if its not set
func String(key string, defaultValue string) string {
val, exists := os.LookupEnv(key)
if !exists {
return defaultValue
}
return val
}