mirror of
https://github.com/gin-gonic/gin.git
synced 2025-05-21 01:17:49 +08:00
Adds debug mode (part 1)
- Adds API to switch the gin's mode - Log listening port - Log routes
This commit is contained in:
6
utils.go
6
utils.go
@ -2,6 +2,8 @@ package gin
|
||||
|
||||
import (
|
||||
"encoding/xml"
|
||||
"reflect"
|
||||
"runtime"
|
||||
)
|
||||
|
||||
type H map[string]interface{}
|
||||
@ -38,3 +40,7 @@ func filterFlags(content string) string {
|
||||
}
|
||||
return content
|
||||
}
|
||||
|
||||
func funcName(f interface{}) string {
|
||||
return runtime.FuncForPC(reflect.ValueOf(f).Pointer()).Name()
|
||||
}
|
||||
|
Reference in New Issue
Block a user