gininitiator

package
v0.30.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 3, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package gininitiator provides Gin engine initialization with middleware setup.

Index

Constants

This section is empty.

Variables

View Source
var HandlePanics gin.RecoveryFunc = func(c *gin.Context, err any) {
	log.Printf("panic happened!!! err: %+v", err)
	c.Abort()
}

HandlePanics is the default panic recovery handler for Gin that logs the panic and aborts the request.

Functions

func InitGin

func InitGin(basePath string, wsParams libParams.ParamInterface, corsConfig *cors.Config) (*gin.Engine, *gin.RouterGroup)

InitGin creates and configures a new Gin engine with logging, recovery, and CORS middleware.

func InitSlogGin

func InitSlogGin(wsParams libParams.ParamInterface, app *gin.Engine)

InitSlogGin configures slog-based logging middleware for the Gin engine.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL