package
0.0.0-20220804084442-c844e6aa1d0e
Repository: https://github.com/hololee2cn/pkg.git
Documentation: pkg.go.dev
# Functions
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
DisableConsoleColor disables color output in the console.
ErrorLogger returns a handlerfunc for any error type.
ErrorLoggerT returns a handlerfunc for a given error type.
ForceConsoleColor force color output in the console.
Logger instances a Logger middleware that will write the logs to gin.DefaultWriter.
LoggerWithConfig instance a Logger middleware with config.
LoggerWithFormatter instance a Logger middleware with the specified log format function.
LoggerWithWriter instance a Logger middleware with the specified writer buffer.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Recovery returns a middleware that recovers from any panics and writes a 500 if there was one.
RecoveryWithWriter returns a middleware for a given writer that recovers from any panics and writes a 500 if there was one.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Constants
No description provided by the author
GinContextContext 存在 gin context 中的标准库 context 实例的 key.
No description provided by the author
# Structs
LogFormatterParams is the structure any formatter will be handed when time to log comes.
LoggerConfig defines the config for Logger middleware.
No description provided by the author
# Type aliases
LogFormatter gives the signature of the formatter function passed to LoggerWithFormatter.