增加websocket支持
This commit is contained in:
20
vendor/github.com/gin-gonic/gin/debug.go
generated
vendored
20
vendor/github.com/gin-gonic/gin/debug.go
generated
vendored
@@ -23,9 +23,6 @@ func IsDebugging() bool {
|
||||
// DebugPrintRouteFunc indicates debug log output format.
|
||||
var DebugPrintRouteFunc func(httpMethod, absolutePath, handlerName string, nuHandlers int)
|
||||
|
||||
// DebugPrintFunc indicates debug log output format.
|
||||
var DebugPrintFunc func(format string, values ...interface{})
|
||||
|
||||
func debugPrintRoute(httpMethod, absolutePath string, handlers HandlersChain) {
|
||||
if IsDebugging() {
|
||||
nuHandlers := len(handlers)
|
||||
@@ -51,19 +48,12 @@ func debugPrintLoadTemplate(tmpl *template.Template) {
|
||||
}
|
||||
|
||||
func debugPrint(format string, values ...any) {
|
||||
if !IsDebugging() {
|
||||
return
|
||||
if IsDebugging() {
|
||||
if !strings.HasSuffix(format, "\n") {
|
||||
format += "\n"
|
||||
}
|
||||
fmt.Fprintf(DefaultWriter, "[GIN-debug] "+format, values...)
|
||||
}
|
||||
|
||||
if DebugPrintFunc != nil {
|
||||
DebugPrintFunc(format, values...)
|
||||
return
|
||||
}
|
||||
|
||||
if !strings.HasSuffix(format, "\n") {
|
||||
format += "\n"
|
||||
}
|
||||
fmt.Fprintf(DefaultWriter, "[GIN-debug] "+format, values...)
|
||||
}
|
||||
|
||||
func getMinVer(v string) (uint64, error) {
|
||||
|
||||
Reference in New Issue
Block a user