Merge e3609b40a3bb6f03bd5b8872d3f96c94821632e7 into 0397e5e0c0f8f8176c29f7edd8f1bff8e45df780

This commit is contained in:
Farshad Bolouri 2024-04-09 17:14:18 +08:00 committed by GitHub
commit 96a3a480ca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

6
gin.go
View File

@ -15,10 +15,11 @@ import (
"strings" "strings"
"sync" "sync"
"github.com/gin-gonic/gin/internal/bytesconv"
"github.com/gin-gonic/gin/render"
"golang.org/x/net/http2" "golang.org/x/net/http2"
"golang.org/x/net/http2/h2c" "golang.org/x/net/http2/h2c"
"github.com/gin-gonic/gin/internal/bytesconv"
"github.com/gin-gonic/gin/render"
) )
const defaultMultipartMemory = 32 << 20 // 32 MB const defaultMultipartMemory = 32 << 20 // 32 MB
@ -396,6 +397,7 @@ func (engine *Engine) Run(addr ...string) (err error) {
address := resolveAddress(addr) address := resolveAddress(addr)
debugPrint("Listening and serving HTTP on %s\n", address) debugPrint("Listening and serving HTTP on %s\n", address)
fmt.Printf("http://localhost:%s", address)
err = http.ListenAndServe(address, engine.Handler()) err = http.ListenAndServe(address, engine.Handler())
return return
} }