middleware

package
v0.0.0-...-faa9808 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultPrefix = "/debug/pprof"
)

Variables

This section is empty.

Functions

func CORS

func CORS() gin.HandlerFunc

func RegisterPPROF

func RegisterPPROF(r *gin.Engine, prefixOptions ...string)

RegisterPPROF the standard Handler Func from the net/http/pprof package with the provided gin.Engine. prefixOptions is an optional. If not prefixOptions, the default path prefix is used, otherwise first prefixOptions will be path prefix.

func RouteRegister

func RouteRegister(rg *gin.RouterGroup, prefixOptions ...string)

RouteRegister the standard HandlerFunc from the net/http/pprof package with the provided gin.RouterGroup. prefixOptions is an optional. If not prefixOptions, the default path prefix is used, otherwise first prefixOptions will be path prefix.

Types

This section is empty.

Jump to

Keyboard shortcuts

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