common

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 7, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeferredGracefulPanicRecovery

func DeferredGracefulPanicRecovery(c *gin.Context)

func Logger

func Logger(prefix ...string) gin.HandlerFunc

Logger creates a gin.HandlerFunc that uses go's standard log package. Use log.SetOutput to modify logging output destination. Prefix is assembled by strings.Join(prefix, " ").

func Must

func Must(fn func(*gin.Context) error) gin.HandlerFunc

func Recovery

func Recovery() gin.HandlerFunc

func ResponseWriteError

func ResponseWriteError(c *gin.Context, _err interface{})

func WriteLogEntry

func WriteLogEntry(c *gin.Context, prefix string, d time.Duration)

Types

This section is empty.

Jump to

Keyboard shortcuts

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