mirror of https://github.com/gin-gonic/gin.git
Enhanced user-friendliness by opening link in terminal
This commit is contained in:
parent
a481ee2897
commit
e3609b40a3
6
gin.go
6
gin.go
|
@ -15,10 +15,11 @@ import (
|
|||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/gin-gonic/gin/internal/bytesconv"
|
||||
"github.com/gin-gonic/gin/render"
|
||||
"golang.org/x/net/http2"
|
||||
"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
|
||||
|
@ -383,6 +384,7 @@ func (engine *Engine) Run(addr ...string) (err error) {
|
|||
|
||||
address := resolveAddress(addr)
|
||||
debugPrint("Listening and serving HTTP on %s\n", address)
|
||||
fmt.Printf("http://localhost:%s", address)
|
||||
err = http.ListenAndServe(address, engine.Handler())
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue