提交kit/ginx

Signed-off-by: lixxxww <941403820@qq.com>
This commit is contained in:
lixxxww
2024-01-23 11:36:11 +00:00
committed by Gitee
parent f3c59b8519
commit 6488dfe4aa
4 changed files with 251 additions and 0 deletions

15
kit/ginx/log_handler.go Normal file
View File

@@ -0,0 +1,15 @@
package ginx
type LogInfo struct {
LogResp bool // 是否记录返回结果
Description string // 请求描述
}
func NewLogInfo(description string) *LogInfo {
return &LogInfo{Description: description, LogResp: false}
}
func (i *LogInfo) WithLogResp(logResp bool) *LogInfo {
i.LogResp = logResp
return i
}