mirror of
https://github.com/lus/pasty.git
synced 2023-08-10 21:13:09 +03:00
Fix some stuff
This commit is contained in:
6
internal/env/env.go
vendored
6
internal/env/env.go
vendored
@@ -16,11 +16,11 @@ func Load() {
|
||||
|
||||
// MustString returns the content of the environment variable with the given key or the given fallback
|
||||
func MustString(key, fallback string) string {
|
||||
found := os.Getenv(static.EnvironmentVariablePrefix + key)
|
||||
if found == "" {
|
||||
value, found := os.LookupEnv(static.EnvironmentVariablePrefix + key)
|
||||
if !found {
|
||||
return fallback
|
||||
}
|
||||
return found
|
||||
return value
|
||||
}
|
||||
|
||||
// MustBool uses MustString and parses it into a boolean
|
||||
|
Reference in New Issue
Block a user