v0.0.173
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
package ginext
|
||||
|
||||
import "github.com/gin-gonic/gin"
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"time"
|
||||
)
|
||||
|
||||
type GinWrapper struct {
|
||||
engine *gin.Engine
|
||||
@@ -9,9 +12,10 @@ type GinWrapper struct {
|
||||
allowCors bool
|
||||
ginDebug bool
|
||||
returnRawErrors bool
|
||||
requestTimeout time.Duration
|
||||
}
|
||||
|
||||
func NewEngine(allowCors bool, ginDebug bool, returnRawErrors bool) *GinWrapper {
|
||||
func NewEngine(allowCors bool, ginDebug bool, returnRawErrors bool, timeout time.Duration) *GinWrapper {
|
||||
engine := gin.New()
|
||||
|
||||
wrapper := &GinWrapper{
|
||||
@@ -20,6 +24,7 @@ func NewEngine(allowCors bool, ginDebug bool, returnRawErrors bool) *GinWrapper
|
||||
allowCors: allowCors,
|
||||
ginDebug: ginDebug,
|
||||
returnRawErrors: returnRawErrors,
|
||||
requestTimeout: timeout,
|
||||
}
|
||||
|
||||
engine.RedirectFixedPath = false
|
||||
|
Reference in New Issue
Block a user