18 lines
363 B
Go
18 lines
363 B
Go
package providers
|
|
|
|
import (
|
|
"framework_v2/internal/access"
|
|
ginzap "github.com/gin-contrib/zap"
|
|
"github.com/gin-gonic/gin"
|
|
"time"
|
|
)
|
|
|
|
func InitGin() {
|
|
gin.SetMode(gin.ReleaseMode)
|
|
|
|
access.Router = gin.New()
|
|
|
|
access.Router.Use(gin.Recovery(), ginzap.Ginzap(access.Logger, time.RFC3339, true))
|
|
access.Router.Use(ginzap.RecoveryWithZap(access.Logger, true))
|
|
}
|