mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-16 21:32:11 +08:00
fix typo and add comments
This commit is contained in:
parent
fb8a113f8d
commit
5944f8d817
@ -34,7 +34,7 @@ func Recovery() HandlerFunc {
|
||||
return RecoveryWithWriter(DefaultErrorWriter)
|
||||
}
|
||||
|
||||
//CustomRecovery returns a middleware that recovers from any panics and calls the provided handle func to handle it.
|
||||
// CustomRecovery returns a middleware that recovers from any panics and calls the provided handle func to handle it.
|
||||
func CustomRecovery(handle RecoveryFunc) HandlerFunc {
|
||||
return RecoveryWithWriter(DefaultErrorWriter, handle)
|
||||
}
|
||||
@ -165,6 +165,7 @@ func function(pc uintptr) []byte {
|
||||
return name
|
||||
}
|
||||
|
||||
// timeFormat returns a customized time string for logger.
|
||||
func timeFormat(t time.Time) string {
|
||||
timeString := t.Format("2006/01/02 - 15:04:05")
|
||||
return timeString
|
||||
|
Loading…
x
Reference in New Issue
Block a user