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"
|
"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
|
||||||
|
@ -383,6 +384,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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue