MCPcopy Index your code
hub / github.com/labstack/echo / newNode

Function newNode

router.go:675–700  ·  view source on GitHub ↗
(
	t kind,
	pre string,
	p *node,
	sc children,
	mh *routeMethods,
	paramsCount int,
	ppath string,
	paramChildren,
	anyChildren *node,
)

Source from the content-addressed store, hash-verified

673}
674
675func newNode(
676 t kind,
677 pre string,
678 p *node,
679 sc children,
680 mh *routeMethods,
681 paramsCount int,
682 ppath string,
683 paramChildren,
684 anyChildren *node,
685) *node {
686 return &node{
687 kind: t,
688 label: pre[0],
689 prefix: pre,
690 parent: p,
691 staticChildren: sc,
692 originalPath: ppath,
693 paramsCount: paramsCount,
694 methods: mh,
695 paramChild: paramChildren,
696 anyChild: anyChildren,
697 isLeaf: sc == nil && paramChildren == nil && anyChildren == nil,
698 isHandler: mh.isHandler(),
699 }
700}
701
702func (n *node) addStaticChild(c *node) {
703 n.staticChildren = append(n.staticChildren, c)

Callers 1

insertMethod · 0.85

Calls 1

isHandlerMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…