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 {
|
func (key EnvKey) GetValue() string {
|
||||||
port := os.Getenv(string(key))
|
keyStr := string(key)
|
||||||
if port == "" {
|
value := os.Getenv(keyStr)
|
||||||
port = "8080"
|
if key == Port && value == "" {
|
||||||
|
value = "8080"
|
||||||
}
|
}
|
||||||
return port
|
|
||||||
|
return value
|
||||||
}
|
}
|
||||||
|
|
||||||
func (key EnvKey) SetValue(value string) {
|
func (key EnvKey) SetValue(value string) {
|
||||||
|
|||||||
Reference in New Issue
Block a user