change: refractored and seperated all code into different parts
This commit is contained in:
18
Backend/helper/system.go
Normal file
18
Backend/helper/system.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package helper
|
||||
|
||||
import (
|
||||
"os"
|
||||
)
|
||||
|
||||
// Returns env with default fallback value.
|
||||
//
|
||||
// Params:
|
||||
//
|
||||
// key - enviroment var name
|
||||
// fallback - default value
|
||||
func GetEnv(key, fallback string) string {
|
||||
if value, ok := os.LookupEnv(key); ok {
|
||||
return value
|
||||
}
|
||||
return fallback
|
||||
}
|
||||
Reference in New Issue
Block a user