fix enviroment bug
All checks were successful
Build Slideshow App / build (amd64, .exe, windows) (push) Successful in 2m11s
Build Slideshow App / build (amd64, , linux) (push) Successful in 2m25s
Build Slideshow App / build (arm, 7, , linux) (push) Successful in 2m16s
Build Slideshow App / build (arm64, , linux) (push) Successful in 2m12s
All checks were successful
Build Slideshow App / build (amd64, .exe, windows) (push) Successful in 2m11s
Build Slideshow App / build (amd64, , linux) (push) Successful in 2m25s
Build Slideshow App / build (arm, 7, , linux) (push) Successful in 2m16s
Build Slideshow App / build (arm64, , linux) (push) Successful in 2m12s
This commit is contained in:
10
env/enviroment.go
vendored
10
env/enviroment.go
vendored
@@ -26,11 +26,13 @@ func Load(path string) error {
|
||||
}
|
||||
|
||||
func (key EnvKey) GetValue() string {
|
||||
port := os.Getenv(string(key))
|
||||
if port == "" {
|
||||
port = "8080"
|
||||
keyStr := string(key)
|
||||
value := os.Getenv(keyStr)
|
||||
if key == Port && value == "" {
|
||||
value = "8080"
|
||||
}
|
||||
return port
|
||||
|
||||
return value
|
||||
}
|
||||
|
||||
func (key EnvKey) SetValue(value string) {
|
||||
|
||||
Reference in New Issue
Block a user