Linting and optimizing struct memory signature. (#1184)
* fix cleanPath spell (#969) * linter and optimize structs
This commit is contained in:
committed by
Bo-Yi Wu
parent
eeb57848ca
commit
6f94fd05c9
@@ -5,22 +5,11 @@
|
||||
package gin
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"reflect"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func printChildren(n *node, prefix string) {
|
||||
fmt.Printf(" %02d:%02d %s%s[%d] %v %t %d \r\n", n.priority, n.maxParams, prefix, n.path, len(n.children), n.handlers, n.wildChild, n.nType)
|
||||
for l := len(n.path); l > 0; l-- {
|
||||
prefix += " "
|
||||
}
|
||||
for _, child := range n.children {
|
||||
printChildren(child, prefix)
|
||||
}
|
||||
}
|
||||
|
||||
// Used as a workaround since we can't compare functions or their addressses
|
||||
var fakeHandlerValue string
|
||||
|
||||
|
||||
Reference in New Issue
Block a user