mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-18 23:12:17 +08:00
This reverts commit 2ff2b19e14420de970264012e1bcdf91929725b4.
This commit is contained in:
parent
d6461a29f0
commit
0f6a9b5eac
4
utils.go
4
utils.go
@ -139,10 +139,10 @@ func resolveAddress(addr []string) string {
|
||||
case 0:
|
||||
if port := os.Getenv("PORT"); port != "" {
|
||||
debugPrint("Environment variable PORT=\"%s\"", port)
|
||||
return "localhost:" + port
|
||||
return ":" + port
|
||||
}
|
||||
debugPrint("Environment variable PORT is undefined. Using port :8080 by default")
|
||||
return "localhost:8080"
|
||||
return ":8080"
|
||||
case 1:
|
||||
return addr[0]
|
||||
default:
|
||||
|
Loading…
x
Reference in New Issue
Block a user